public interface EntityType extends Serializable
Modifier and Type | Method and Description |
---|---|
void |
add(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> 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) |
Key |
getKey() |
String |
getName()
Returns the name of this entity type.
|
Table |
getTable() |
EntityValidator |
getValidator() |
boolean |
isComposedAttribute(String name) |
boolean |
isSimpleAttribute(String name) |
boolean |
isValid(Entity object) |
void |
remove(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 . |
<T> SimpleAttribute<T> createSimpleAttribute(@NotNull String name, @NotNull Class<T> type) throws de.espirit.or.SchemaException
name
and type
.de.espirit.or.SchemaException
ComposedAttribute createComposedAttribute(String name, @NotNull EntityType targetType, @NotNull ComposedAttribute.Relation type, @Nullable String opposedName) throws de.espirit.or.SchemaException
name
.de.espirit.or.SchemaException
String getName()
Collection<? extends Attribute<?>> getAttributes()
Collection<String> getAttributeNames()
@Nullable Attribute<?> getAttribute(@NotNull String name)
name
.@Nullable <T> Attribute<T> getAttribute(@NotNull String name, @NotNull Class<T> type) throws de.espirit.or.SchemaException
de.espirit.or.SchemaException
@Nullable EntityValidator getValidator()
boolean isValid(Entity object) throws de.espirit.or.ORException
de.espirit.or.ORException
Table getTable()
Key getKey()
void removeAttribute(String name)
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.boolean isSimpleAttribute(String name)
boolean isComposedAttribute(String name)
void add(EntityTypeListener listener)
void remove(EntityTypeListener listener)
Copyright © 2014 e-Spirit AG. All Rights Reserved. Build 5.0_BETA.500