net.sf.stitch.crud
Class CrudEntity

java.lang.Object
  extended by net.sf.stitch.crud.CrudEntity

public class CrudEntity
extends java.lang.Object

CRUD Profile for an Entity class.

Author:
Logan Hutchinson

Constructor Summary
CrudEntity(java.lang.String entityClassName)
          Construct a new CrudProfile for a given entity class.
 
Method Summary
protected static java.lang.String fieldNameFromXetter(java.lang.String methodName)
           
 java.lang.String getEntityClassName()
           
 java.util.Collection<CrudEntityProperty> getEntityFields()
           
 java.lang.String getEntityHome()
           
 java.lang.String getEntityPrefix()
           
 java.lang.String getEntityQuery()
           
 java.lang.String getEntityShortName()
           
 java.lang.String getMessageKey()
          Gets the resource bundle key for translating the entity class into a localized message.
protected static boolean isBeanMethod(java.lang.reflect.Method m, java.lang.String prefix)
           
protected static boolean isGetter(java.lang.reflect.Method m)
           
protected static boolean isSetter(java.lang.reflect.Method m)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrudEntity

public CrudEntity(java.lang.String entityClassName)
           throws java.lang.ClassNotFoundException
Construct a new CrudProfile for a given entity class.

Parameters:
entityClassName -
Throws:
java.lang.ClassNotFoundException
Method Detail

isGetter

protected static boolean isGetter(java.lang.reflect.Method m)

isSetter

protected static boolean isSetter(java.lang.reflect.Method m)

isBeanMethod

protected static boolean isBeanMethod(java.lang.reflect.Method m,
                                      java.lang.String prefix)

fieldNameFromXetter

protected static java.lang.String fieldNameFromXetter(java.lang.String methodName)

getEntityClassName

public java.lang.String getEntityClassName()
Returns:
Full class name for Entity (example: package.EntityClass).

getEntityShortName

public java.lang.String getEntityShortName()
Returns:
Short class name (no package) for Entity (example: EntityClass).

getEntityPrefix

public java.lang.String getEntityPrefix()
Returns:
Prefix for Seam Component Names and Variables related to Entity (example: entityClass).

getEntityHome

public java.lang.String getEntityHome()
Returns:
Seam Component Name of the EntityHome object related to the Entity.

getEntityQuery

public java.lang.String getEntityQuery()
Returns:
Seam Component Name of the EntityQuery object related to the Entity.

getEntityFields

public java.util.Collection<CrudEntityProperty> getEntityFields()
Returns:
Collection of Properties/Fields for the Entity.

getMessageKey

public java.lang.String getMessageKey()
Gets the resource bundle key for translating the entity class into a localized message.

Returns:
Typically, package.class


Copyright © 2007. All Rights Reserved.