Class Property
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.snap.data.Property
- All Implemented Interfaces:
- Archivable,- RMJSONArchiver.GetKeys,- RMPropertyChanger,- Cloneable,- Comparable
This class describes an attribute of an entity.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enumstatic enum
- 
Constructor SummaryConstructorsConstructorDescriptionProperty()Creates a new property.Creates a new property with given name.Property(String aName, Property.Type aType) Creates a new property with given name and type.Creates a new property with given name and type.
- 
Method SummaryModifier and TypeMethodDescriptionclone()Standard clone implementation.intImplements comparable to compare based on name.convertValue(Object anObj) Converts an arbitrary object to property type.booleanStandard equals implementation.fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.Returns the date type.Returns the default date type.Returns default value for this property.Returns the entity that owns this property.Returns the enum strings as a single string (comma separated).Returns the enum strings (for type Enum).Returns JSON keys.getKeyValue(String aKey) RMKey.Get implementation to return Property for key from RelationEntity (if found).getName()Returns the name of this property.booleanReturns the nullable default.Returns the number type.Return default number type.Returns the relation entity.Returns the name of the entity that this relation property points to.Returns the relation local property.Returns the property name local to this property's entity that the relation uses as a key (primary or foreign).Returns the relation remote property.Returns the property name that the relation uses as a key in the remote table (primary or foreign).Returns the name in a standard format (strip is/get prefix and start with capital letter).Returns the string size.Return default string size.getType()Returns the type of this property.booleanReturns whether this property is a simple attribute.booleanReturns whether column is automatically generated (numbered), thus read-only.booleanReturns whether property value is derived from other properties and doesn't require persistence.booleanReturns whether property allows nulls.booleanReturns whether this property is a primary key.booleanReturns whether this property is private.booleanReturns whether this property is a relation.booleanisToMany()Returns whether this property is a to many relation.voidsetAutoGenerated(boolean aValue) Sets whether column is automatically generated (numbered), thus read-only.voidsetDateType(Property.DateType aDateType) Sets the date type.voidsetDefaultValue(Object aValue) Sets default value for this property.voidSets the entity that owns this property.voidsetEnumsString(String aValue) Sets the enum strings as a single string (comma separated).voidsetEnumStrings(List<String> theValues) Sets the enum strings (for type Enum).voidSets the name of this property.voidsetNullable(boolean aValue) Sets whether property allows nulls.voidsetNumberType(Property.NumberType aNumberType) Sets the number type.voidsetPrimary(boolean isPrimary) Sets whether this property is a primary key.voidsetPrivate(boolean isPrivate) Sets whether this property is private.voidsetRelationEntity(Entity anEntity) Sets the relation entity.voidsetRelationEntityName(String aName) Sets the name of the entity that this relation property points to.voidSets the property name local to this property's entity that the relation uses as a key (primary or foreign).voidSets the property name that the relation uses as a key in the remote table (primary or foreign).voidsetStringSize(Property.StringSize aSize) Sets the string size.voidsetToMany(boolean aValue) Sets whether this property is a to many relation.voidsetType(Property.Type aType) Sets the type of this property.voidsetTypeFromSample(String aSample) Sets property type from sample string - tries to discern whether string represents a date or number.voidsetTypeName(String aName) Sets the type from a given name.toString()Returns a string representation of this property (its name).Returns a string representation of given value according to property type.toXML(RXArchiver anArchiver) XML archival.Methods inherited from class com.inductiveautomation.rm.base.RMObjectaddPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChangeMethods inherited from class com.inductiveautomation.rm.base.RMListenerListaddListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
- 
Constructor Details- 
Propertypublic Property()Creates a new property.
- 
PropertyCreates a new property with given name.
- 
PropertyCreates a new property with given name and type.
- 
PropertyCreates a new property with given name and type.
 
- 
- 
Method Details- 
getEntityReturns the entity that owns this property.
- 
setEntitySets the entity that owns this property.
- 
getNameReturns the name of this property.
- 
setNameSets the name of this property.
- 
getStandardNameReturns the name in a standard format (strip is/get prefix and start with capital letter).
- 
getTypeReturns the type of this property.
- 
setTypeSets the type of this property.
- 
setTypeNameSets the type from a given name.
- 
setTypeFromSampleSets property type from sample string - tries to discern whether string represents a date or number.
- 
isPrimarypublic boolean isPrimary()Returns whether this property is a primary key.
- 
setPrimarypublic void setPrimary(boolean isPrimary) Sets whether this property is a primary key.
- 
isPrivatepublic boolean isPrivate()Returns whether this property is private.
- 
setPrivatepublic void setPrivate(boolean isPrivate) Sets whether this property is private.
- 
getStringSizeReturns the string size.
- 
setStringSizeSets the string size.
- 
getStringSizeDefaultReturn default string size.
- 
getNumberTypeReturns the number type.
- 
setNumberTypeSets the number type.
- 
getNumberTypeDefaultReturn default number type.
- 
getDateTypeReturns the date type.
- 
setDateTypeSets the date type.
- 
getDateTypeDefaultReturns the default date type.
- 
isAutoGeneratedpublic boolean isAutoGenerated()Returns whether column is automatically generated (numbered), thus read-only.
- 
setAutoGeneratedpublic void setAutoGenerated(boolean aValue) Sets whether column is automatically generated (numbered), thus read-only.
- 
isNullablepublic boolean isNullable()Returns whether property allows nulls.
- 
setNullablepublic void setNullable(boolean aValue) Sets whether property allows nulls.
- 
getNullableDefaultpublic boolean getNullableDefault()Returns the nullable default.
- 
getDefaultValueReturns default value for this property.
- 
setDefaultValueSets default value for this property.
- 
getEnumStringsReturns the enum strings (for type Enum).
- 
setEnumStringsSets the enum strings (for type Enum).
- 
getEnumsStringReturns the enum strings as a single string (comma separated).
- 
setEnumsStringSets the enum strings as a single string (comma separated).
- 
isAttributepublic boolean isAttribute()Returns whether this property is a simple attribute.
- 
isRelationpublic boolean isRelation()Returns whether this property is a relation.
- 
isToManypublic boolean isToMany()Returns whether this property is a to many relation.
- 
isDerivedpublic boolean isDerived()Returns whether property value is derived from other properties and doesn't require persistence. A common (though advanced) example is a relationship that references the primary key against a foreign table/key. A less sophisticated example would be a property based on an expression comprised of other properties.
- 
setToManypublic void setToMany(boolean aValue) Sets whether this property is a to many relation.
- 
getRelationEntityReturns the relation entity.
- 
setRelationEntitySets the relation entity.
- 
getRelationEntityNameReturns the name of the entity that this relation property points to.
- 
setRelationEntityNameSets the name of the entity that this relation property points to.
- 
getRelationLocalPropertyNameReturns the property name local to this property's entity that the relation uses as a key (primary or foreign).
- 
setRelationLocalPropertyNameSets the property name local to this property's entity that the relation uses as a key (primary or foreign).
- 
getRelationRemotePropertyNameReturns the property name that the relation uses as a key in the remote table (primary or foreign).
- 
setRelationRemotePropertyNameSets the property name that the relation uses as a key in the remote table (primary or foreign).
- 
getRelationLocalPropertyReturns the relation local property.
- 
getRelationRemotePropertyReturns the relation remote property.
- 
convertValueConverts an arbitrary object to property type.
- 
getKeyValueRMKey.Get implementation to return Property for key from RelationEntity (if found).
- 
toStringReturns a string representation of given value according to property type.
- 
equalsStandard equals implementation.
- 
cloneStandard clone implementation.- Overrides:
- clonein class- RMListenerList
 
- 
compareToImplements comparable to compare based on name.- Specified by:
- compareToin interface- Comparable
 
- 
toXMLXML archival.- Specified by:
- toXMLin interface- Archivable
 
- 
fromXMLXML unarchival.- Specified by:
- fromXMLin interface- Archivable
 
- 
getJSONKeysReturns JSON keys.- Specified by:
- getJSONKeysin interface- RMJSONArchiver.GetKeys
 
- 
toStringReturns a string representation of this property (its name).
 
-