org.apache.empire.data.bean
Class BeanClass

java.lang.Object
  extended by org.apache.empire.data.bean.BeanClass

public abstract class BeanClass
extends Object

BeanObject This class defines Metadata for any type of java class. For each class you want to describe create one Metadata class and derive it from BeanClass. A metadata definition consists primarily of the class name and a list of properties.

Author:
Rainer

Field Summary
protected  BeanDomain domain
           
 
Constructor Summary
protected BeanClass(String name)
           
protected BeanClass(String name, BeanDomain dom)
           
 
Method Summary
protected  void addProp(BeanProperty prop)
           
protected  BeanProperty addProp(String propname, DataType dataType, double size, boolean required)
           
protected  BeanProperty addProp(String propname, DataType dataType, double size, boolean required, String controlType)
           
protected  BeanProperty addProp(String propname, DataType dataType, double size, boolean required, String controlType, boolean readOnly)
           
protected  BeanProperty addProp(String propname, DataType dataType, double size, DataMode dataMode)
           
protected  BeanProperty addProp(String propname, DataType dataType, double size, DataMode dataMode, String controlType)
           
 BeanDomain getDomain()
          returns the domain this class belongs to (if any)
 Column[] getKeyColumns()
          returns the list of key columns (if any)
 String getName()
          returns the name of this class
 List<BeanProperty> getProperties()
          returns the list of properties for this class.
protected  void setKeyColumn(Column keyColumn)
          Sets the key to a single column
protected  void setKeyColumns(Column[] keyColumns)
          Sets the list of key columns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

domain

protected BeanDomain domain
Constructor Detail

BeanClass

protected BeanClass(String name)

BeanClass

protected BeanClass(String name,
                    BeanDomain dom)
Method Detail

addProp

protected void addProp(BeanProperty prop)

addProp

protected final BeanProperty addProp(String propname,
                                     DataType dataType,
                                     double size,
                                     DataMode dataMode,
                                     String controlType)

addProp

protected final BeanProperty addProp(String propname,
                                     DataType dataType,
                                     double size,
                                     DataMode dataMode)

addProp

protected final BeanProperty addProp(String propname,
                                     DataType dataType,
                                     double size,
                                     boolean required,
                                     String controlType,
                                     boolean readOnly)

addProp

protected final BeanProperty addProp(String propname,
                                     DataType dataType,
                                     double size,
                                     boolean required,
                                     String controlType)

addProp

protected final BeanProperty addProp(String propname,
                                     DataType dataType,
                                     double size,
                                     boolean required)

setKeyColumns

protected void setKeyColumns(Column[] keyColumns)
Sets the list of key columns.

Parameters:
keyColumns - the list of key columns.

setKeyColumn

protected final void setKeyColumn(Column keyColumn)
Sets the key to a single column

Parameters:
keyColumn -

getName

public String getName()
returns the name of this class

Returns:
the class name

getProperties

public List<BeanProperty> getProperties()
returns the list of properties for this class.

Returns:
the list of properties for this class.

getDomain

public BeanDomain getDomain()
returns the domain this class belongs to (if any)

Returns:
the domain this class belongs to or null.

getKeyColumns

public Column[] getKeyColumns()
returns the list of key columns (if any)

Returns:
the list of key columns or null.


Copyright © 2008–2014 Apache Software Foundation. All rights reserved.