Package com.ribs.datasource
Class RMProperty
java.lang.Object
com.ribs.datasource.RMProperty
This class describes an attribute of an entity.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an uninitialized property.RMProperty(String aName, String aType, String aSubtype, boolean isPrimary, boolean isPrivate) Creates a property with the given name and type and subtype. -
Method Summary
Modifier and TypeMethodDescriptionconvertToType(String aValue) Converts the given string to the properties type.booleanStandard equals implementation.fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.getName()Returns the name of this property.intReturns a unique id issued by this property.Returns the subtype of this property.Returns the subtype class.getType()Returns the type of this property.booleanReturns whether this property is a simple attribute.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.voidsetPrimary(boolean isPrimary) Sets whether this property is a primary key.voidsetPrivate(boolean isPrivate) Sets whether this property is private.voidsetSubtype(String aSubType) Sets the subtype of this property.voidsetSubtypeClass(Class aClass) Sets the subtype class.voidSets the type of this property.toString()Returns a string representation of this property (its name).toXML(RXArchiver anArchiver) XML archival.
-
Field Details
-
PROPERTY_TYPE_STRING
- See Also:
-
PROPERTY_TYPE_NUMBER
- See Also:
-
PROPERTY_TYPE_DATE
- See Also:
-
PROPERTY_TYPE_BOOLEAN
- See Also:
-
PROPERTY_TYPE_BINARY
- See Also:
-
PROPERTY_TYPE_LIST
- See Also:
-
PROPERTY_TYPE_MAP
- See Also:
-
-
Constructor Details
-
Method Details
-
getName
Returns the name of this property. -
getType
Returns the type of this property. -
setType
Sets the type of this property. -
getSubtype
Returns the subtype of this property. -
setSubtype
Sets the subtype of this property. -
getSubtypeClass
Returns the subtype class. -
setSubtypeClass
Sets the subtype class. -
isPrimary
public boolean isPrimary()Returns whether this property is a primary key. -
setPrimary
public void setPrimary(boolean isPrimary) Sets whether this property is a primary key. -
isPrivate
public boolean isPrivate()Returns whether this property is private. -
setPrivate
public void setPrivate(boolean isPrivate) Sets whether this property is private. -
isAttribute
public boolean isAttribute()Returns whether this property is a simple attribute. -
isRelation
public boolean isRelation()Returns whether this property is a relation. -
isToMany
public boolean isToMany()Returns whether this property is a to many relation. -
convertToType
Converts the given string to the properties type. -
getNextUniqueId
public int getNextUniqueId()Returns a unique id issued by this property. -
equals
Standard equals implementation. -
toString
Returns a string representation of this property (its name). -
toXML
XML archival. -
fromXML
XML unarchival.
-