Vordel SDK

com.vordel.es
Interface EntityType

All Superinterfaces:
java.lang.Comparable
All Known Implementing Classes:
EntityTypeImpl

public interface EntityType
extends java.lang.Comparable

The type definition for Entities in the EntityStore framework


Field Summary
static java.lang.String ABSTRACT
          Constant for XML 'abstract' defintion attribute
static java.lang.String CARDINALITY
          Constant for XML 'cardinality' defintion attribute
static java.lang.String COMPONENT_TYPE
          Constant for XML 'componentType' defintion element
static java.lang.String CONSTANT
          Constant for XML 'constant' defintion element
static java.lang.String DEFAULT
          Constant for XML 'default' defintion attribute
static java.lang.String DEFAULT_REF
          Constant for XML 'defaultRef' definition element
static java.lang.String DEFAULT_VALUE
          Constant for XML 'defaultValue' definition element
static java.lang.String ENTITY_TYPE
          Constant for XML 'entityType' defintion element
static java.lang.String EXTENDS
          Constant for XML 'extends' defintion attribute
static java.lang.String FIELD
          Constant for XML 'field' defintion element
static java.lang.String IS_KEY
          Constant for XML 'keyness' defintion attribute
static java.lang.String NAME
          Constant for XML 'name' defintion attribute
static java.lang.String ONE_OR_MANY
           
static java.lang.String TYPE
          Constant for XML 'type' defintion element
static java.lang.String VSTAMP
           
static java.lang.String ZERO_OR_MANY
           
static java.lang.String ZERO_OR_ONE
           
 
Method Summary
 boolean allowsChildEntities()
           
 boolean allowsComponent(EntityType type)
           
 boolean allowsReferences()
           
 boolean allowsSoftReferences()
           
 Field createField(java.lang.String fieldName, ESPK refPK)
           
 Field createField(java.lang.String fieldName, java.lang.String value)
           
 Field createField(java.lang.String fieldName, Value[] values)
           
 boolean extendsType(java.lang.String parentType)
           
 java.util.Collection<java.lang.String> getAllConstantFieldNames()
           
 java.util.Collection<Field> getAllConstantFields()
           
 java.util.Set<java.lang.String> getAllDeclaredConstantFieldNames()
           
 java.util.Set<java.lang.String> getAllDeclaredFieldNames()
           
 java.util.Collection<java.lang.String> getAllDeclaredKeyFields()
           
 java.util.Collection<java.lang.String> getAllDefaultedFieldNames()
           
 java.util.Collection<java.lang.String> getAllFieldNames()
           
 Field getConstantField(java.lang.String fieldName)
           
 java.util.Map<java.lang.String,java.lang.Object> getDeclaredComponentTypes()
           
 FieldType getFieldType(java.lang.String name)
          Get the field type for the specified field name.
 java.lang.String[] getKeyFieldNames()
           
 java.lang.String getName()
           
 org.w3c.dom.Element getRootElement()
           
 EntityType getSuperType()
          Get the super type of this type.
 boolean hasSuperType(java.lang.String candidate)
          Check to see if the specified type is an ancestor of this type
 boolean isAbstract()
           
 boolean isCompatible(EntityType other)
           
 boolean isConstantField(java.lang.String fieldName)
           
 boolean isKeyField(Field f)
           
 boolean isSubType(EntityType candidate)
          Check that the specified type is a subtype of this type.
 java.lang.String serialize()
          Deprecated. Serialising XML to strings is evil. replaced by (write)
 void write(java.io.OutputStream os)
           
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

VSTAMP

static final java.lang.String VSTAMP
See Also:
Constant Field Values

TYPE

static final java.lang.String TYPE
Constant for XML 'type' defintion element

See Also:
Constant Field Values

ENTITY_TYPE

static final java.lang.String ENTITY_TYPE
Constant for XML 'entityType' defintion element

See Also:
Constant Field Values

FIELD

static final java.lang.String FIELD
Constant for XML 'field' defintion element

See Also:
Constant Field Values

CONSTANT

static final java.lang.String CONSTANT
Constant for XML 'constant' defintion element

See Also:
Constant Field Values

COMPONENT_TYPE

static final java.lang.String COMPONENT_TYPE
Constant for XML 'componentType' defintion element

See Also:
Constant Field Values

NAME

static final java.lang.String NAME
Constant for XML 'name' defintion attribute

See Also:
Constant Field Values

EXTENDS

static final java.lang.String EXTENDS
Constant for XML 'extends' defintion attribute

See Also:
Constant Field Values

ABSTRACT

static final java.lang.String ABSTRACT
Constant for XML 'abstract' defintion attribute

See Also:
Constant Field Values

CARDINALITY

static final java.lang.String CARDINALITY
Constant for XML 'cardinality' defintion attribute

See Also:
Constant Field Values

IS_KEY

static final java.lang.String IS_KEY
Constant for XML 'keyness' defintion attribute

See Also:
Constant Field Values

DEFAULT

static final java.lang.String DEFAULT
Constant for XML 'default' defintion attribute

See Also:
Constant Field Values

DEFAULT_REF

static final java.lang.String DEFAULT_REF
Constant for XML 'defaultRef' definition element

See Also:
Constant Field Values

DEFAULT_VALUE

static final java.lang.String DEFAULT_VALUE
Constant for XML 'defaultValue' definition element

See Also:
Constant Field Values

ZERO_OR_ONE

static final java.lang.String ZERO_OR_ONE
See Also:
Constant Field Values

ZERO_OR_MANY

static final java.lang.String ZERO_OR_MANY
See Also:
Constant Field Values

ONE_OR_MANY

static final java.lang.String ONE_OR_MANY
See Also:
Constant Field Values
Method Detail

getSuperType

EntityType getSuperType()
Get the super type of this type.

Returns:
The EntityType which this type extends

hasSuperType

boolean hasSuperType(java.lang.String candidate)
Check to see if the specified type is an ancestor of this type

Parameters:
candidate -
Returns:
true if the candidate is an ancestor type of this type, false otherwise

isAbstract

boolean isAbstract()

isCompatible

boolean isCompatible(EntityType other)

getName

java.lang.String getName()

getAllFieldNames

java.util.Collection<java.lang.String> getAllFieldNames()

getFieldType

FieldType getFieldType(java.lang.String name)
Get the field type for the specified field name.

Parameters:
name - The name of the field
Returns:
the type of the field, or null if the named field is undefined for this type

getAllDefaultedFieldNames

java.util.Collection<java.lang.String> getAllDefaultedFieldNames()

getKeyFieldNames

java.lang.String[] getKeyFieldNames()

isSubType

boolean isSubType(EntityType candidate)
Check that the specified type is a subtype of this type.

Parameters:
candidate - The candidate type
Returns:
true if the specified type is indeed a subtype of this type, false otherwise.

extendsType

boolean extendsType(java.lang.String parentType)

isConstantField

boolean isConstantField(java.lang.String fieldName)

getAllConstantFields

java.util.Collection<Field> getAllConstantFields()

getAllDeclaredFieldNames

java.util.Set<java.lang.String> getAllDeclaredFieldNames()

getAllDeclaredKeyFields

java.util.Collection<java.lang.String> getAllDeclaredKeyFields()

getAllDeclaredConstantFieldNames

java.util.Set<java.lang.String> getAllDeclaredConstantFieldNames()

getAllConstantFieldNames

java.util.Collection<java.lang.String> getAllConstantFieldNames()

getConstantField

Field getConstantField(java.lang.String fieldName)

allowsChildEntities

boolean allowsChildEntities()

allowsComponent

boolean allowsComponent(EntityType type)

allowsReferences

boolean allowsReferences()

createField

Field createField(java.lang.String fieldName,
                  ESPK refPK)
                  throws EntityStoreException
Throws:
EntityStoreException

createField

Field createField(java.lang.String fieldName,
                  java.lang.String value)
                  throws EntityStoreException
Throws:
EntityStoreException

createField

Field createField(java.lang.String fieldName,
                  Value[] values)
                  throws EntityStoreException
Throws:
EntityStoreException

isKeyField

boolean isKeyField(Field f)

getDeclaredComponentTypes

java.util.Map<java.lang.String,java.lang.Object> getDeclaredComponentTypes()

serialize

java.lang.String serialize()
                           throws EntityStoreException
Deprecated. Serialising XML to strings is evil. replaced by (write)

Get the XML form of this EntityType

Returns:
a String containing an XML document which describes this type
Throws:
EntityStoreException

getRootElement

org.w3c.dom.Element getRootElement()

write

void write(java.io.OutputStream os)
           throws java.io.IOException
Throws:
java.io.IOException

allowsSoftReferences

boolean allowsSoftReferences()

Vordel SDK


This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel