Class ColumnProperty
- java.lang.Object
-
- com.vaadin.v7.data.util.sqlcontainer.ColumnProperty
-
- All Implemented Interfaces:
Property,Serializable
@Deprecated public final class ColumnProperty extends Object implements Property
Deprecated.As of 8.0, no replacement available.ColumnProperty represents the value of one column in a RowItem. In addition to the value, ColumnProperty also contains some basic column attributes such as nullability status, read-only status and data type. Note that depending on the QueryDelegate in use this does not necessarily map into an actual column in a database table.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classColumnProperty.NotNullableExceptionDeprecated.-
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Property
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeEvent, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeEvent, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer
-
-
Constructor Summary
Constructors Constructor Description ColumnProperty(String propertyId, boolean readOnly, boolean allowReadOnlyChange, boolean nullable, boolean primaryKey, Object value, Class<?> type)Deprecated.Creates a new ColumnProperty instance.ColumnProperty(String propertyId, boolean readOnly, boolean allowReadOnlyChange, boolean nullable, Object value, Class<?> type)Deprecated.As of 7.0.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcommit()Deprecated.ObjectgetOldValue()Deprecated.Returns the original non-modified value of this property if it has been modified.StringgetPropertyId()Deprecated.Class<?>getType()Deprecated.Returns the type of the Property.ObjectgetValue()Deprecated.Returns the current value for this property.booleanisModified()Deprecated.booleanisNullable()Deprecated.booleanisPersistent()Deprecated.Return whether the value of this property should be persisted to the database.booleanisPrimaryKey()Deprecated.booleanisReadOnly()Deprecated.Tests if the Property is in read-only mode.booleanisReadOnlyChangeAllowed()Deprecated.Returns whether the read-only status of this property can be changed usingsetReadOnly(boolean).booleanisRowIdentifier()Deprecated.Returns whether or not this property is used as a row identifier.booleanisVersionColumn()Deprecated.voidsetOwner(RowItem owner)Deprecated.voidsetReadOnly(boolean newStatus)Deprecated.Sets the Property's read-only mode to the specified status.voidsetValue(Object newValue)Deprecated.Sets the value of the Property.voidsetVersionColumn(boolean versionColumn)Deprecated.
-
-
-
Constructor Detail
-
ColumnProperty
@Deprecated public ColumnProperty(String propertyId, boolean readOnly, boolean allowReadOnlyChange, boolean nullable, Object value, Class<?> type)
Deprecated.As of 7.0. UseColumnProperty(String, boolean, boolean, boolean, boolean, Object, Class)insteadDeprecated constructor for ColumnProperty. If this is used the primary keys are not identified correctly in some cases for some databases (i.e. Oracle). See http://dev.vaadin.com/ticket/9145.- Parameters:
propertyId-readOnly-allowReadOnlyChange-nullable-value-type-
-
ColumnProperty
public ColumnProperty(String propertyId, boolean readOnly, boolean allowReadOnlyChange, boolean nullable, boolean primaryKey, Object value, Class<?> type)
Deprecated.Creates a new ColumnProperty instance.- Parameters:
propertyId- The ID of this property.readOnly- Whether this property is read-only.allowReadOnlyChange- Whether the read-only status of this property can be changed.nullable- Whether this property accepts null values.primaryKey- Whether this property corresponds to a database primary key.value- The value of this property.type- The type of this property.
-
-
Method Detail
-
getValue
public Object getValue()
Deprecated.Returns the current value for this property. To get the previous value (if one exists) for a modified property usegetOldValue().
-
getOldValue
public Object getOldValue()
Deprecated.Returns the original non-modified value of this property if it has been modified.- Returns:
- The original value if
isModified()is true,getValue()otherwise.
-
setValue
public void setValue(Object newValue) throws Property.ReadOnlyException, Converter.ConversionException
Deprecated.Description copied from interface:PropertySets the value of the Property.Implementing this functionality is optional. If the functionality is missing, one should declare the Property to be in read-only mode and throw
Note : Since Vaadin 7.0, setting the value of a non-String property as a String is no longer supported.Property.ReadOnlyExceptionin this function.- Specified by:
setValuein interfaceProperty- Parameters:
newValue- New value of the Property. This should be assignable to the type returned by getType- Throws:
Property.ReadOnlyException- if the object is in read-only modeConverter.ConversionException
-
getType
public Class<?> getType()
Deprecated.Description copied from interface:PropertyReturns the type of the Property. The methodsgetValueandsetValuemust be compatible with this type: one must be able to safely cast the value returned fromgetValueto the given type and pass any variable assignable to this type as an argument tosetValue.
-
isReadOnly
public boolean isReadOnly()
Deprecated.Description copied from interface:PropertyTests if the Property is in read-only mode. In read-only mode calls to the methodsetValuewill throwReadOnlyExceptionand will not modify the value of the Property.- Specified by:
isReadOnlyin interfaceProperty- Returns:
trueif the Property is in read-only mode,falseif it's not
-
isReadOnlyChangeAllowed
public boolean isReadOnlyChangeAllowed()
Deprecated.Returns whether the read-only status of this property can be changed usingsetReadOnly(boolean).Used to prevent setting to read/write mode a property that is not allowed to be written by the underlying database. Also used for values like VERSION and AUTO_INCREMENT fields that might be set to read-only by the container but the database still allows writes.
- Returns:
- true if the read-only status can be changed, false otherwise.
-
setReadOnly
public void setReadOnly(boolean newStatus)
Deprecated.Description copied from interface:PropertySets the Property's read-only mode to the specified status. This functionality is optional, but all properties must implement theisReadOnlymode query correctly.- Specified by:
setReadOnlyin interfaceProperty- Parameters:
newStatus- new read-only status of the Property
-
isPrimaryKey
public boolean isPrimaryKey()
Deprecated.
-
getPropertyId
public String getPropertyId()
Deprecated.
-
setOwner
public void setOwner(RowItem owner)
Deprecated.
-
isModified
public boolean isModified()
Deprecated.
-
isVersionColumn
public boolean isVersionColumn()
Deprecated.
-
setVersionColumn
public void setVersionColumn(boolean versionColumn)
Deprecated.
-
isNullable
public boolean isNullable()
Deprecated.
-
isPersistent
public boolean isPersistent()
Deprecated.Return whether the value of this property should be persisted to the database.- Returns:
- true if the value should be written to the database, false otherwise.
-
isRowIdentifier
public boolean isRowIdentifier()
Deprecated.Returns whether or not this property is used as a row identifier.- Returns:
- true if the property is a row identifier, false otherwise.
-
commit
public void commit()
Deprecated.
-
-