Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package net.java.ao.schema.info;
 
 
 import java.util.Set;

A description of the table generated by the net.java.ao.RawEntity

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

Parameters:
<T> the entity interface
<K> the primary key for the entity
Since:
0.21
public interface EntityInfo<T extends RawEntity<K>, K>
{

    

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

    

Returns:
the name of the table
    String getName();

    

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

    

Returns:
all the fields for the table
    Set<FieldInfogetFields();

    

Returns:
all the field names for the table
See also:
FieldInfo.getName()
    Set<StringgetFieldNames();

    

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

    

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

    

Parameters:
method the method to test whether it is an accessor
Returns:
true if the method is an accessor for the entity, false otherwise
    boolean hasAccessor(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
    boolean hasMutator(Method method);

    

Parameters:
fieldName the name of the database column
Returns:
true if the fieldName is associated with the entity, false otherwise
    boolean hasField(String fieldName);
New to GrepCode? Check out our FAQ X