public class RMProperty
extends com.reportmill.base.RMObject
implements java.lang.Comparable
Modifier and Type | Class and Description |
---|---|
static class |
RMProperty.DateType |
static class |
RMProperty.NumberType |
static class |
RMProperty.StringSize |
static class |
RMProperty.Type |
Constructor and Description |
---|
RMProperty()
Creates a new property.
|
RMProperty(java.lang.String aName)
Creates a new property with given name.
|
RMProperty(java.lang.String aName,
RMProperty.Type aType)
Creates a new property with given name and type.
|
Modifier and Type | Method and Description |
---|---|
RMProperty |
clone()
Standard clone implementation.
|
RMProperty |
clone(RMProperty aProperty)
Makes this property a clone of given property.
|
int |
compareTo(java.lang.Object anObj)
Implements comparable to compare based on name.
|
java.lang.Object |
convertValue(java.lang.Object anObj)
Converts an arbitrary object to property type.
|
boolean |
equals(java.lang.Object anObj)
Standard equals implementation.
|
RMProperty |
fromXML(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
XML unarchival.
|
RMProperty.DateType |
getDateType()
Returns the date type.
|
java.lang.Object |
getDefaultValue()
Returns default value for this property.
|
RMEntity |
getEntity()
Returns the entity that owns this property.
|
java.util.List<java.lang.String> |
getEnumValues()
Returns the enum values (for type Enum).
|
java.lang.String |
getEnumValuesString()
Returns the enum values as a string (comma separated).
|
java.lang.String |
getName()
Returns the name of this property.
|
RMProperty.NumberType |
getNumberType()
Returns the number type.
|
RMEntity |
getRelationEntity()
Returns the relation entity.
|
java.lang.String |
getRelationEntityName()
Returns the name of the entity that this relation property points to.
|
RMProperty |
getRelationLocalProperty()
Returns the relation local property.
|
java.lang.String |
getRelationLocalPropertyName()
Returns the property name local to this property's entity that the relation uses as a key (primary or foreign).
|
RMProperty |
getRelationRemoteProperty()
Returns the relation remote property.
|
java.lang.String |
getRelationRemotePropertyName()
Returns the property name that the relation uses as a key in the remote table (primary or foreign).
|
java.lang.String |
getStandardName()
Returns the name in a standard format (strip is/get prefix and start with capital letter).
|
RMProperty.StringSize |
getStringSize()
Returns the string size.
|
RMProperty.Type |
getType()
Returns the type of this property.
|
boolean |
isAttribute()
Returns whether this property is a simple attribute.
|
boolean |
isAutoGenerated()
Returns whether column is automatically generated (numbered), thus read-only.
|
boolean |
isDerived()
Returns whether property value is derived from other properties and doesn't require persistence.
|
boolean |
isNullable()
Returns whether property allows nulls.
|
boolean |
isPrimary()
Returns whether this property is a primary key.
|
boolean |
isPrivate()
Returns whether this property is private.
|
boolean |
isRelation()
Returns whether this property is a relation.
|
boolean |
isToMany()
Returns whether this property is a to many relation.
|
void |
setAutoGenerated(boolean aValue)
Sets whether column is automatically generated (numbered), thus read-only.
|
void |
setDateType(RMProperty.DateType aDateType)
Sets the date type.
|
void |
setDefaultValue(java.lang.Object aValue)
Sets default value for this property.
|
void |
setEntity(RMEntity anEntity)
Sets the entity that owns this property.
|
void |
setEnumValues(java.util.List<java.lang.String> theValues)
Sets the enum values (for type Enum).
|
void |
setEnumValuesString(java.lang.String aValue)
Sets the enum values as a string (comma separated).
|
void |
setName(java.lang.String aName)
Sets the name of this property.
|
void |
setNullable(boolean aValue)
Sets whether property allows nulls.
|
void |
setNumberType(RMProperty.NumberType aNumberType)
Sets the number type.
|
void |
setPrimary(boolean isPrimary)
Sets whether this property is a primary key.
|
void |
setPrivate(boolean isPrivate)
Sets whether this property is private.
|
void |
setRelationEntityName(java.lang.String aName)
Sets the name of the entity that this relation property points to.
|
void |
setRelationLocalPropertyName(java.lang.String aName)
Sets the property name local to this property's entity that the relation uses as a key (primary or foreign).
|
void |
setRelationRemotePropertyName(java.lang.String aName)
Sets the property name that the relation uses as a key in the remote table (primary or foreign).
|
void |
setStringSize(RMProperty.StringSize aSize)
Sets the string size.
|
void |
setToMany(boolean aValue)
Sets whether this property is a to many relation.
|
void |
setType(RMProperty.Type aType)
Sets the type of this property.
|
void |
setTypeFromSample(java.lang.String aSample)
Sets property type from sample string - tries to discern whether string represents a date or number.
|
void |
setTypeName(java.lang.String aName)
Sets the type from a given name.
|
java.lang.String |
toString()
Returns a string representation of this property (its name).
|
java.lang.String |
toString(java.lang.Object aValue)
Returns a string representation of given value according to property type.
|
com.reportmill.archiver.RXElement |
toXML(com.reportmill.archiver.RXArchiver anArchiver,
java.lang.Object anOwner)
XML archival.
|
addListener, addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, getListener, getListenerCount, getListeners, isFirePropertyChangeEnabled, isUndoing, removeListener, removePropertyChangeListener, setFirePropertyChangeEnabled, setUndoing
public RMProperty()
public RMProperty(java.lang.String aName)
public RMProperty(java.lang.String aName, RMProperty.Type aType)
public RMEntity getEntity()
public void setEntity(RMEntity anEntity)
public java.lang.String getName()
public void setName(java.lang.String aName)
public java.lang.String getStandardName()
public RMProperty.Type getType()
public void setType(RMProperty.Type aType)
public void setTypeName(java.lang.String aName)
public void setTypeFromSample(java.lang.String aSample)
public boolean isAutoGenerated()
public void setAutoGenerated(boolean aValue)
public boolean isNullable()
public void setNullable(boolean aValue)
public boolean isPrimary()
public void setPrimary(boolean isPrimary)
public boolean isPrivate()
public void setPrivate(boolean isPrivate)
public java.lang.Object getDefaultValue()
public void setDefaultValue(java.lang.Object aValue)
public RMProperty.StringSize getStringSize()
public void setStringSize(RMProperty.StringSize aSize)
public RMProperty.NumberType getNumberType()
public void setNumberType(RMProperty.NumberType aNumberType)
public RMProperty.DateType getDateType()
public void setDateType(RMProperty.DateType aDateType)
public java.util.List<java.lang.String> getEnumValues()
public void setEnumValues(java.util.List<java.lang.String> theValues)
public java.lang.String getEnumValuesString()
public void setEnumValuesString(java.lang.String aValue)
public boolean isAttribute()
public boolean isRelation()
public boolean isToMany()
public boolean isDerived()
public void setToMany(boolean aValue)
public java.lang.String getRelationEntityName()
public void setRelationEntityName(java.lang.String aName)
public java.lang.String getRelationLocalPropertyName()
public void setRelationLocalPropertyName(java.lang.String aName)
public java.lang.String getRelationRemotePropertyName()
public void setRelationRemotePropertyName(java.lang.String aName)
public RMEntity getRelationEntity()
public RMProperty getRelationLocalProperty()
public RMProperty getRelationRemoteProperty()
public java.lang.Object convertValue(java.lang.Object anObj)
public java.lang.String toString(java.lang.Object aValue)
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public RMProperty clone()
clone
in class com.reportmill.base.RMObject
public RMProperty clone(RMProperty aProperty)
public int compareTo(java.lang.Object anObj)
compareTo
in interface java.lang.Comparable
public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver, java.lang.Object anOwner)
public RMProperty fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
public java.lang.String toString()
toString
in class com.reportmill.base.RMObject