|
ReportMill 10 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.reportmill.datasource.RMProperty
public class RMProperty
This class describes an attribute of an entity.
Field Summary | |
---|---|
static java.lang.String |
TYPE_BINARY
|
static java.lang.String |
TYPE_BOOLEAN
|
static java.lang.String |
TYPE_DATE
|
static java.lang.String |
TYPE_LIST
|
static java.lang.String |
TYPE_MAP
|
static java.lang.String |
TYPE_NUMBER
|
static java.lang.String |
TYPE_OTHER
|
static java.lang.String |
TYPE_STRING
|
Constructor Summary | |
---|---|
RMProperty()
Creates an uninitialized property. |
|
RMProperty(java.lang.String aName,
java.lang.String aType,
java.lang.String aSubtype,
boolean isPrimary,
boolean isPrivate)
Creates a property with the given name and type and subtype. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Standard clone implementation. |
int |
compareTo(java.lang.Object anObj)
Implements comparable to compare based on name. |
boolean |
equals(java.lang.Object anObj)
Standard equals implementation. |
java.lang.Object |
fromXML(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement)
XML unarchival. |
java.lang.String |
getAlias()
Returns the alias for this property. |
java.text.Format |
getFormat()
Returns format for this property. |
java.lang.Object |
getMetaData(java.lang.String aName)
Returns a meta data value for a name. |
java.lang.String |
getName()
Returns the name of this property. |
int |
getNextUniqueId()
Returns a unique id issued by this property. |
int |
getSQLType()
Returns the SQL type (one of java.sql.Types). |
static int |
getSQLType(java.lang.String aPropertyType)
Returns the default SQL type for a given property type. |
static int[] |
getSQLTypes(java.lang.String aPropertyType)
Returns the default SQL types for a given property type. |
java.lang.String |
getSQLTypeString()
Returns the SQL type as a string. |
static java.lang.String |
getSQLTypeString(int sqlType)
Returns the string for a given sql type. |
java.lang.String |
getSubtype()
Returns the subtype of this property. |
java.lang.Class |
getSubtypeClass()
Returns the subtype class. |
java.lang.String |
getType()
Returns the type of this property. |
static java.lang.String |
getType(int anSQLType)
Returns the RMProperty type for an SQL type. |
boolean |
isAttribute()
Returns whether this property is a simple attribute. |
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. |
static boolean |
isValidTypeSQLTypePair(java.lang.String aPropertyType,
int sqlType)
Returns whether given RMProperty-type/sql-type pair is valid. |
void |
setFormat(java.text.Format aFormat)
Sets the format. |
void |
setMetaData(java.lang.String aName,
java.lang.Object aValue)
Sets a meta data value for a name. |
static void |
setMetaDataValueClass(java.lang.String aName,
java.lang.Class aClass)
Sets a metadata type. |
void |
setName(java.lang.String aName)
Sets the name of this property. |
void |
setPrimary(boolean isPrimary)
Sets whether this property is a primary key. |
void |
setPrivate(boolean isPrivate)
Sets whether this property is private. |
void |
setSQLType(int aType)
Sets the SQL type (one of java.sql.Types). |
void |
setSubtype(java.lang.String aSubType)
Sets the subtype of this property. |
void |
setSubtypeClass(java.lang.Class aClass)
Sets the subtype class. |
void |
setType(java.lang.String 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. |
java.lang.String |
toString()
Returns a string representation of this property (its name). |
com.reportmill.archiver.RXElement |
toXML(com.reportmill.archiver.RXArchiver anArchiver)
XML archival. |
java.lang.Object |
valueOf(java.lang.String aString)
Converts xml attribute string to a specific type. |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TYPE_STRING
public static final java.lang.String TYPE_NUMBER
public static final java.lang.String TYPE_DATE
public static final java.lang.String TYPE_BOOLEAN
public static final java.lang.String TYPE_BINARY
public static final java.lang.String TYPE_LIST
public static final java.lang.String TYPE_MAP
public static final java.lang.String TYPE_OTHER
Constructor Detail |
---|
public RMProperty()
public RMProperty(java.lang.String aName, java.lang.String aType, java.lang.String aSubtype, boolean isPrimary, boolean isPrivate)
Method Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String aName)
public java.lang.String getAlias()
public java.lang.String getType()
public void setType(java.lang.String aType)
public void setTypeFromSample(java.lang.String aSample)
public java.lang.String getSubtype()
public void setSubtype(java.lang.String aSubType)
public java.lang.Class getSubtypeClass()
public void setSubtypeClass(java.lang.Class aClass)
public int getSQLType()
public void setSQLType(int aType)
public java.lang.String getSQLTypeString()
public static java.lang.String getType(int anSQLType)
public static int getSQLType(java.lang.String aPropertyType)
public static int[] getSQLTypes(java.lang.String aPropertyType)
public static java.lang.String getSQLTypeString(int sqlType)
public static boolean isValidTypeSQLTypePair(java.lang.String aPropertyType, int sqlType)
public boolean isPrimary()
public void setPrimary(boolean isPrimary)
public boolean isPrivate()
public void setPrivate(boolean isPrivate)
public java.text.Format getFormat()
public void setFormat(java.text.Format aFormat)
public boolean isAttribute()
public boolean isRelation()
public boolean isToMany()
public int getNextUniqueId()
public java.lang.Object getMetaData(java.lang.String aName)
public void setMetaData(java.lang.String aName, java.lang.Object aValue)
public static void setMetaDataValueClass(java.lang.String aName, java.lang.Class aClass)
public java.lang.Object valueOf(java.lang.String aString)
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public int compareTo(java.lang.Object anObj)
compareTo
in interface java.lang.Comparable
public java.lang.String toString()
toString
in class java.lang.Object
public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver)
public java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement)
|
ReportMill 10 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |