|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.data.DataComponent
public abstract class DataComponent
The super class of element and attribute.
Warning: Serialized objects of this class or of a deployed class which is derived from it may not be compatible with future releases of C24 Integreation Objects. The current serialization support is appropriate for short term storage or RMI between applications running the same version of C24 Integreation Objects.
Field Summary | |
---|---|
static int |
CARDINALITY_UNBOUNDED
The value of a cardinality that is unbounded. |
static String |
IO_VALIDATE_DATABASE_KEY_PRESENCE
Deprecated. Use Utils.SYSTEM_PROPERTY_SUPPRESS_DATABASE_KEY_VALIDATION instead. |
Method Summary | |
---|---|
Object |
createObject()
Creates and returns a new object defined by this component. |
Object |
createObject(String typeName,
String typeUri)
Creates an returns a new object defined by this component and a type derived from this components type. |
boolean |
equals(Object o)
|
abstract String |
formatObject(Object obj)
Returns a String representation of the supplied Object. |
Annotation |
getAnnotation()
Returns the annotation of this component. |
XPathStatement |
getCardinalityConstraint()
Returns the cardinality constraint. |
String |
getCardinalityString()
Returns a string represntation of the cardinality of this component. |
String |
getDatabaseColumnName()
Returns the name of the database column that this component represents. |
String |
getDefaultValue()
Returns the default value of this component. |
String |
getDescription()
Returns a description of this component. |
String |
getFixedValue()
Returns the fixed value. |
FormEnum |
getForm()
Returns the form of this component or the model's default. |
FormEnum |
getForm(boolean deep)
Returns the form of this component or optionally the model's default. |
XPathStatement |
getLengthConstraint()
Returns the length constraint. |
Logger |
getLog()
Returns the static singleton log4j Logger object used to log messages for this object. |
int |
getMaxCardinality()
Returns the maximum cardinality of this component. |
int |
getMinCardinality()
Returns the minimum cardinality of this component. |
DataModel |
getModel()
Returns the model. |
String |
getName()
Returns the name of this component. |
String |
getOriginalName()
Returns the original name if it is different to the name property, otherwise the name is returned. |
DataComponent |
getRef()
Returns the component referenced by this component. |
String |
getSSOffset()
Returns the R1C1 style offset for SpreadSheet
binding. |
DataType |
getType()
Returns the type of this component. |
int |
hashCode()
|
boolean |
isFixedCardinality()
Convenience method to get whether this component is of fixed cardinality (ie getMinCardinality() = getMaxCardinality() ). |
boolean |
isGroup()
Returns whether this component is a group, i.e. an element group or attribute group. |
boolean |
isOptional()
Convenience method to get whether this component is optional (i.e. |
boolean |
isPrimaryKey()
Returns whether this element represents a primary key in a database or not. |
boolean |
isRepeating()
Convenience method to get whether this component is repeating (ie getMaxCardinality() does not return 1). |
abstract Object |
parseObject(String str)
Returns an Object representation of the supplied String data. |
void |
setAnnotation(Annotation annotation)
Sets the annotation of this component. |
void |
setCardinalityConstraint(XPathStatement cardinalityConstraint)
Sets the cardinality constraint. |
void |
setDatabaseColumnName(String databaseColumnName)
Sets the database column name of the component |
void |
setDefaultValue(String defaultValue)
Sets the default value. |
void |
setFixedValue(String fixedValue)
Sets the fixed value. |
void |
setForm(FormEnum form)
Sets the form of this component. |
void |
setGroup(boolean group)
Sets whether this component is a group. |
void |
setLengthConstraint(XPathStatement lengthConstraint)
Sets the length constraint. |
void |
setMaxCardinality(int maxCardinality)
Sets the maximum cardinatlity of this component. |
void |
setMinCardinality(int minCardinality)
Sets the minimum cardinality of this component. |
void |
setModel(DataModel model)
Sets the model. |
void |
setName(String name)
Sets the name of this component. |
void |
setOriginalName(String originalName)
Sets the original name of the component. |
void |
setPrimaryKey(boolean primaryKey)
Sets whether this element should represent a primary key in a database. |
void |
setRef(DataComponent ref)
Sets the ref of this component. |
void |
setSSOffset(String ssOffset)
Sets the offset for SpreadSheet binding. |
void |
setType(DataType type)
Sets the type of this component. |
String |
toString()
|
boolean |
validate(ComplexDataObject object)
Deprecated. Use ValidationManager instead - this method will be removed in the next major version release. |
boolean |
validate(ComplexDataObject object,
ValidationConstraints vc)
Deprecated. Use ValidationManager instead - this method will be removed in the next major version release. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String IO_VALIDATE_DATABASE_KEY_PRESENCE
Utils.SYSTEM_PROPERTY_SUPPRESS_DATABASE_KEY_VALIDATION
instead.
public static final int CARDINALITY_UNBOUNDED
Method Detail |
---|
public Logger getLog()
public Object createObject()
createObject(String,String)
.
public Object createObject(String typeName, String typeUri)
typeName
- The name of the type to use.typeUri
- The URI of the namespace of the type to use.
public abstract Object parseObject(String str) throws ParserException
str
- The data to be parsed.
ParserException
- If the data in the supplied String cannot be suitably rendered according to the type of this component.public abstract String formatObject(Object obj)
obj
- The object representing the instance of this component.
public DataModel getModel()
public void setModel(DataModel model)
model
- The model.public String getName()
ModelComponent
getName
in interface ModelComponent
public void setName(String name)
name
- The new namepublic String getOriginalName()
public void setOriginalName(String originalName)
originalName
- The new original name.public String getDatabaseColumnName()
public void setDatabaseColumnName(String databaseColumnName)
databaseColumnName
- The actual database column namepublic Annotation getAnnotation()
public void setAnnotation(Annotation annotation)
annotation
- The new annotation.public boolean isGroup()
public void setGroup(boolean group)
group
- The new value.public DataType getType()
public void setType(DataType type)
type
- The new type.public DataComponent getRef()
public void setRef(DataComponent ref)
ref
- The new ref.public boolean validate(ComplexDataObject object) throws ValidationException
ValidationManager
instead - this method will be removed in the next major version release.
object
- The object to be validated.
true
if the validation is successful.
ValidationException
- If the validation fails and the object is in ValidationMechanismEnum.VALIDATION_MECHANISM_EXCEPTION
mode.public boolean validate(ComplexDataObject object, ValidationConstraints vc) throws ValidationException
ValidationManager
instead - this method will be removed in the next major version release.
object
- The object to be valdiated.vc
- The validation constraints to use.
true
if the validation is successful.
ValidationException
- If the validation fails and the object is in ValidationMechanismEnum.VALIDATION_MECHANISM_EXCEPTION
mode.public int getMinCardinality()
public void setMinCardinality(int minCardinality)
minCardinality
- The new value.
IllegalArgumentException
- If minCardinality < 0
.public int getMaxCardinality()
CARDINALITY_UNBOUNDED
if there is no upper bound.public void setMaxCardinality(int maxCardinality)
maxCardinality
- The new value.
IllegalArgumentException
- If maxCardinality < 0
.public boolean isOptional()
getMinCardinality()
returns 0).
public boolean isRepeating()
getMaxCardinality()
does not return 1).
public boolean isFixedCardinality()
getMinCardinality()
= getMaxCardinality()
).
public String getCardinalityString()
public String getDefaultValue()
public void setDefaultValue(String defaultValue)
defaultValue
- The new default value.public String getFixedValue()
public void setFixedValue(String fixedValue)
fixedValue
- The new fixed value.public FormEnum getForm(boolean deep)
deep
- Whether to return the model's default form if this component's form is FormEnum.UNSPECIFIED
.
public FormEnum getForm()
getForm(true)
.
getForm(boolean).
public void setForm(FormEnum form)
form
- The new value.
NullPointerException
- If form == null
.public XPathStatement getLengthConstraint()
public void setLengthConstraint(XPathStatement lengthConstraint)
lengthConstraint
- The length constraint.public XPathStatement getCardinalityConstraint()
This allows the cardinality of this element to be defined at runtime. When an instance of this element is created and associated with the hierarchy tree, it will execute this xpath statement to find a numeric value which will determine it's cardinality.
public void setCardinalityConstraint(XPathStatement cardinalityConstraint)
cardinalityConstraint
- The cardinality constraint.public String getDescription()
The description is taken from the annotation if one is present, otherwise the empty string is returned.
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public boolean isPrimaryKey()
public void setPrimaryKey(boolean primaryKey)
primaryKey
- True or Falsepublic String getSSOffset()
R1C1
style offset for SpreadSheet
binding.
SSSink
public void setSSOffset(String ssOffset)
SpreadSheet
binding.
ssOffset
- The new offset in R1C1
style.getSSOffset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |