public class GenericWrapperField extends XFTFieldWrapper implements SchemaFieldI
wrapped
Constructor and Description |
---|
GenericWrapperField() |
Modifier and Type | Method and Description |
---|---|
boolean |
compareValues(Object o1,
Object o2) |
Object |
formatValue(Object o) |
String |
getAdjustedSize()
If the size is not defined and the type is a string then '255' is returned.
|
ArrayList |
getAllFields()
returns all fields from all levels.
|
ArrayList |
getAllFieldsWXMLPath(String header) |
Hashtable |
getAllPossibleXMLFieldNames()
Returns Hashtable of all possible root xml-field names.
|
String |
getAutoIncrement()
Returns true if this field is specified as auto-increment.
|
String |
getBaseCol()
Gets baseCol property of wrapped field
|
String |
getBaseElement()
Gets lower-case version of base element property fo the wrapped field
|
String |
getDefaultValue()
Returns the default value of the field's sql field.
|
GenericWrapperField |
getDirectField(String name)
if this field has a direct child (level 1) with the specified xml name, it is returned.
|
ArrayList |
getDirectFields()
Returns the fields which are defined directly below this field.
|
ArrayList |
getDirectFieldsNoFilter() |
ArrayList |
getDuplicateRelationships() |
boolean |
getExpose()
if wrapped field's expose equals 'false' then false is returned, else true is returned.
|
XFTFactoryI |
getFactory()
Gets factory for the defined wrapper.
|
String |
getForeignCol()
wrapped field's relation's foreignCol (default empty string)
|
String |
getForeignKeyTable()
wrapped field's relation's foreignKeyTable (default empty string)
|
GenericWrapperField |
getGenericXFTField() |
String |
getId() |
String |
getJAVAName()
If this field has a specified java name, it is returned.
|
ArrayList |
getLocalRefNames()
Returns mapping arrays for this field to its relations.
|
String |
getName(boolean withPrefix)
if wrapped field has a displayName then that is returned, else
the wrapped field's name is returned.
|
String |
getOnDelete()
wrapped field's relation's onDelete (default 'setnull')
|
protected XFTElementWrapper |
getParentE() |
SchemaElementI |
getParentElement() |
ArrayList |
getPossibleValues()
ArrayList of String (possibleValue)
|
String |
getPrefix() |
boolean |
getPreventLoop() |
String |
getPrimaryKey()
Returns the primary key value of the field's sql field.
|
SchemaElementI |
getReferenceElement()
returns the GenericWrapperElement referenced by the getRefElement() method.
|
XMLType |
getReferenceElementName()
returns the XMLType of the wrapped column.
|
ArrayList |
getReferenceKeys(XFTElement p)
Generates XFTFields for all of the Referenced Element's primary key fields and returns them as
wrapped Fields.
|
String |
getRelationName() |
String |
getRelationType() |
boolean |
getRelationUnique() |
String |
getRelationUniqueComposite() |
String |
getRequired()
Returns true if this field is a primary key, is required, or has use=required.
|
String |
getRequiredWOPk()
Returns true if this field is required or has use=required.
|
ArrayList |
getRules()
Assigns rules based on this field's data type and its additional details.
|
String |
getSize()
Defined size
|
XFTSqlField |
getSqlField()
If the wrapped field has a Sql Field, it is returned.
|
String |
getSQLName()
If this field has a specified sql name, it is returned (lower case).
|
TorqueField |
getTorqueField()
If the wrapped field has a TorqueField, it is returned.
|
String |
getType(TypeConverter tc)
Returns the type formatted by the specified type converter.
|
String |
getUniqueComposite()
if the unique composite property for this field is set to 'true'
|
XFTReferenceI |
getXFTReference()
If this field is a reference, then the field's XFTReferenceI is returned.
|
String |
getXMLDisplay()
gets XmlDisplay property of the wrapped field.
|
ArrayList |
getXMLFields(int level,
ArrayList layers,
Hashtable uriToPrefixMapping)
Returns name and level of all xml data fields.
|
String |
getXMLJavaNameValue()
If this field has a specified java name it is returned, Else an empty string is returned.
|
String |
getXMLName()
Returns the xml name of the given field.
|
String |
getXMLPathString() |
String |
getXMLPathString(String elementName) |
String |
getXMLSqlNameValue()
If this field has a specified sql name it is returned, Else an empty string is returned.
|
XMLType |
getXMLType()
Return the specified type.
|
String |
getXPATH() |
boolean |
hasBase()
if baseCol and baseElement are empty.
|
boolean |
hasDuplicateRelationships() |
boolean |
hasRelation()
if wrapped field has a relation
|
boolean |
isAttribute()
Returns if this field is an xml attribute.
|
boolean |
isBooleanField() |
boolean |
isChildXMLNode()
if field's reference element will have its own distinct XML Node.
|
boolean |
isCreatedChild()
TRUE if this item was created from a maxOccurs=unbounded reference and was not a root node.
|
boolean |
isExtension()
if wrapped field isExtension()
|
boolean |
isFilter() |
boolean |
isInLineRepeaterElement()
if field is an in-line-repeater-element.
|
boolean |
isLeafNode() |
static boolean |
IsLeafNode(XFTField xf)
if the field is a XFTDataField with a defined XMLType or a field with no children
(including attributes).
|
boolean |
isOnlyRoot() |
boolean |
isPossibleLoop() |
boolean |
isPrimaryKey()
if the primary key for this field's sql field is set to 'true'
|
boolean |
isRequired()
Returns true if this field is specified as required.
|
boolean |
isUnique()
if the unique property for this field is set to 'true'
|
boolean |
isXMLOnly()
if the xml only property for this field is set to 'true'
|
Object |
parseValue(Object o) |
String |
toString() |
getName, getWrapped, isHidden, isMultiple, isReference, loadElement, setWrapped
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName, isReference
public XFTFactoryI getFactory()
XFTFieldWrapper
getFactory
in class XFTFieldWrapper
public TorqueField getTorqueField()
public Hashtable getAllPossibleXMLFieldNames() throws ElementNotFoundException, XFTInitException
ElementNotFoundException
XFTInitException
public SchemaElementI getParentElement() throws ClassCastException
getParentElement
in interface SchemaFieldI
ClassCastException
public XFTSqlField getSqlField()
public String getXMLJavaNameValue()
public String getXMLSqlNameValue()
public String getXMLName()
public String getSQLName()
getSQLName
in interface SchemaFieldI
public String getJAVAName()
public ArrayList getDirectFields()
public ArrayList getDirectFieldsNoFilter()
public ArrayList getAllFields()
public boolean isPrimaryKey()
public boolean isXMLOnly()
public String getAdjustedSize()
public String getSize()
public boolean isUnique()
public String getUniqueComposite()
public ArrayList getLocalRefNames() throws ElementNotFoundException
ElementNotFoundException
public XMLType getXMLType()
public boolean isAttribute()
public boolean isCreatedChild()
public String getType(TypeConverter tc)
tc
- public String getRequired()
public String getRequiredWOPk()
public boolean isRequired()
public String getAutoIncrement()
public String getDefaultValue()
public String getPrimaryKey()
public String getName(boolean withPrefix)
public String getPrefix()
public boolean getExpose()
public String getOnDelete()
public String getForeignKeyTable()
public String getForeignCol()
public boolean hasRelation()
public static boolean IsLeafNode(XFTField xf)
xf
- public boolean isLeafNode()
public SchemaElementI getReferenceElement() throws XFTInitException, ElementNotFoundException
getReferenceElement
in interface SchemaFieldI
XFTInitException
ElementNotFoundException
public XFTReferenceI getXFTReference() throws XFTInitException, ElementNotFoundException
XFTInitException
ElementNotFoundException
public XMLType getReferenceElementName()
public ArrayList getReferenceKeys(XFTElement p) throws Exception, XFTInitException
p
- Parent ElementException
- Wrapped Key fields of the referenced ElementXFTInitException
public String getBaseElement()
public String getBaseCol()
public boolean hasBase()
public ArrayList getPossibleValues()
public ArrayList getRules()
public ArrayList getXMLFields(int level, ArrayList layers, Hashtable uriToPrefixMapping)
public boolean isExtension()
public GenericWrapperField getDirectField(String name) throws FieldNotFoundException
name
- (XML name)FieldNotFoundException
public boolean isChildXMLNode()
public boolean isInLineRepeaterElement()
public String getXMLDisplay()
public ArrayList getAllFieldsWXMLPath(String header) throws XFTInitException, ElementNotFoundException
header
- XFTInitException
ElementNotFoundException
public String getRelationType()
public String getRelationName()
public ArrayList getDuplicateRelationships()
public boolean hasDuplicateRelationships()
public boolean getRelationUnique()
public String getRelationUniqueComposite()
public String getId()
getId
in interface Identifier
getId
in interface SchemaFieldI
public String getXMLPathString(String elementName)
getXMLPathString
in interface SchemaFieldI
public String getXMLPathString()
public String getXPATH()
getXPATH
in class XFTFieldWrapper
public boolean isFilter()
public GenericWrapperField getGenericXFTField()
getGenericXFTField
in interface SchemaFieldI
public boolean isBooleanField()
isBooleanField
in interface SchemaFieldI
protected XFTElementWrapper getParentE() throws ClassCastException
getParentE
in class XFTFieldWrapper
ClassCastException
public Object formatValue(Object o) throws InvalidValueException
InvalidValueException
public boolean getPreventLoop()
public boolean isOnlyRoot()
public boolean isPossibleLoop()
Copyright © 2015 Neuroinformatics Research Group. All rights reserved.