de.espirit.or.schema
Interface EntityType

All Superinterfaces:
Serializable

public interface EntityType
extends Serializable

Since:
4.0.17

Method Summary
 void add(de.espirit.or.schema.EntityTypeListener listener)
           
 boolean containsAttribute(String name)
           
 ComposedAttribute createComposedAttribute(String name, EntityType targetType, ComposedAttribute.Relation type, String opposedName)
          Create a composed attribute with the given name.
<T> de.espirit.or.schema.SimpleAttribute<T>
createSimpleAttribute(String name, Class<T> type)
          Create a simple attribute with the given name and type.
 Attribute<?> getAttribute(String name)
          Return the attribute with the given name.
<T> Attribute<T>
getAttribute(String name, Class<T> type)
           
 Collection<String> getAttributeNames()
          Return a name list of all declared attributes.
 Collection<? extends Attribute<?>> getAttributes()
          Return all declared attributes by this entity type.
 String getAvailableAttributeName(String name)
           
 de.espirit.or.schema.Key getKey()
           
 String getName()
          Returns the name of this entity type.
 de.espirit.or.schema.Table getTable()
           
 EntityValidator getValidator()
           
 boolean isComposedAttribute(String name)
           
 boolean isSimpleAttribute(String name)
           
 boolean isValid(Entity object)
           
 void remove(de.espirit.or.schema.EntityTypeListener listener)
           
 void removeAttribute(String name)
          Deletes the given attribute name from this entity type.
 void setName(String name)
          Set the name of this entity type to name.
 

Method Detail

createSimpleAttribute

<T> de.espirit.or.schema.SimpleAttribute<T> createSimpleAttribute(@NotNull
                                                                  String name,
                                                                  @NotNull
                                                                  Class<T> type)
                                                              throws de.espirit.or.SchemaException
Create a simple attribute with the given name and type.

Throws:
de.espirit.or.SchemaException
Since:
4.0.17

createComposedAttribute

ComposedAttribute createComposedAttribute(String name,
                                          @NotNull
                                          EntityType targetType,
                                          @NotNull
                                          ComposedAttribute.Relation type,
                                          String opposedName)
                                          throws de.espirit.or.SchemaException
Create a composed attribute with the given name.

Throws:
de.espirit.or.SchemaException
Since:
4.0.17

containsAttribute

boolean containsAttribute(@NotNull
                          String name)
Since:
4.0.17

getName

String getName()
Returns the name of this entity type.

Since:
4.0.17

setName

void setName(@NotNull
             String name)
Set the name of this entity type to name.

Since:
4.0.17

getAttributes

Collection<? extends Attribute<?>> getAttributes()
Return all declared attributes by this entity type.

Since:
4.0.17

getAttributeNames

Collection<String> getAttributeNames()
Return a name list of all declared attributes.

Since:
4.0.17

getAttribute

@Nullable
Attribute<?> getAttribute(@NotNull
                                   String name)
Return the attribute with the given name.

Since:
4.0.17

getAttribute

@Nullable
<T> Attribute<T> getAttribute(@NotNull
                                       String name,
                                       @NotNull
                                       Class<T> type)
                          throws de.espirit.or.SchemaException
Throws:
de.espirit.or.SchemaException
Since:
4.0.17

getValidator

@Nullable
EntityValidator getValidator()
Since:
4.0.17

isValid

boolean isValid(Entity object)
                throws de.espirit.or.ORException
Throws:
de.espirit.or.ORException
Since:
4.0.17

getTable

de.espirit.or.schema.Table getTable()
Since:
4.0.17

getKey

de.espirit.or.schema.Key getKey()
Since:
4.0.17

getAvailableAttributeName

String getAvailableAttributeName(String name)
Since:
4.0.17

removeAttribute

void removeAttribute(String name)
Deletes the given attribute name from this entity type. If the attribute is a main attribute in an 1:1 or 1:n relation then the opposed attribute will be removed from the target entity type.

Since:
4.0.17

isSimpleAttribute

boolean isSimpleAttribute(String name)
Since:
4.0.17

isComposedAttribute

boolean isComposedAttribute(String name)
Since:
4.0.17

add

void add(de.espirit.or.schema.EntityTypeListener listener)
Since:
4.0.17

remove

void remove(de.espirit.or.schema.EntityTypeListener listener)
Since:
4.0.17


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480