net.java.ao.schema.info
Interface EntityInfo<T extends RawEntity<K>,K>

Type Parameters:
T - the entity interface
K - the primary key for the entity

public interface EntityInfo<T extends RawEntity<K>,K>

A description of the table generated by the RawEntity

Note this is different to TypeInfo which describes what type a column is in the database. EntityInfo describes the table.

Since:
0.21

Method Summary
 Class<T> getEntityType()
           
 FieldInfo getField(Method method)
           
 FieldInfo getField(String fieldName)
           
 Set<String> getFieldNames()
           
 Set<FieldInfo> getFields()
           
 String getName()
           
 FieldInfo<K> getPrimaryKey()
           
 boolean hasAccessor(Method method)
           
 boolean hasField(String fieldName)
           
 boolean hasMutator(Method method)
           
 

Method Detail

getEntityType

Class<T> getEntityType()
Returns:
the inteface for the entity <T>

getName

String getName()
Returns:
the name of the table

getPrimaryKey

FieldInfo<K> getPrimaryKey()
Returns:
the primary key for the table

getFields

Set<FieldInfo> getFields()
Returns:
all the fields for the table

getFieldNames

Set<String> getFieldNames()
Returns:
all the field names for the table
See Also:
FieldInfo.getName()

getField

FieldInfo getField(Method method)
Parameters:
method - an accessor or mutator from the entity
Returns:
the FieldInfo associated with the method.

getField

FieldInfo getField(String fieldName)
Parameters:
fieldName - the name of the database column
Returns:
the FieldInfo associated with the fieldName

hasAccessor

boolean hasAccessor(Method method)
Parameters:
method - the method to test whether it is an accessor
Returns:
true if the method is an accessor for the entity, false otherwise

hasMutator

boolean hasMutator(Method method)
Parameters:
method - the method to test whether it is an mutator
Returns:
true if the method is an mutator for the entity, false otherwise

hasField

boolean hasField(String fieldName)
Parameters:
fieldName - the name of the database column
Returns:
true if the fieldName is associated with the entity, false otherwise


Copyright © 2007-2014. All Rights Reserved.