Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-01


oracle.toplink.tools.ejb11
Class DDDefinition

java.lang.Object
  extended byoracle.toplink.tools.ejb11.DDDefinition


public class DDDefinition
extends java.lang.Object

API for defining the deployment descriptor properties of a CMP entity bean. The properties that are supported include those that are in the toplink-cmp-bean file (except the project-related ones) and some others which are required in the ejb-jar and weblogic-ejb-jar files. If further properties are required then they will need to be manually added.

See Also:
DDProjectDefinition, DDGenerator

Constructor Summary
DDDefinition()
DDDefinition Constructor

Method Summary
void addFinder(java.lang.String methodName, java.util.Vector methodParamNames, java.util.Vector methodParamTypes, java.lang.String finderType, java.lang.String finderQuery)
Specify a finder for this bean.
void setCacheUsage(java.lang.String cacheUsageLevel)
Set the cache usage for finders.
void setCmpFields(java.util.Vector fields)
Set the names of the fields that are container-managed.
void setEjbClass(java.lang.Class beanClass)
Set the class of the bean implementation.
void setEJBName(java.lang.String ejbNameString)
Set the name (identifier) of the bean.
void setHomeClass(java.lang.Class homeClass)
Set the class of the home interface.
void setJndiName(java.lang.String jndiNameString)
Set the name used to store the home interface of the bean in JNDI.
void setPersistenceType(java.lang.String type)
Set the persistence type that specifies BMP or CMP.
void setPrimKeyClass(java.lang.Class primaryKeyClass)
Set the class of the primary key.
void setPrimKeyField(java.lang.String primaryKeyField)
Set the name of the primary key field on the entity bean.
void setReadOnly(boolean readOnlyFlag)
Set whether the bean is to be read-only or not.
void setReentrant(boolean reentrantFlag)
Set whether the bean is reentrant or not.
void setRefreshCache(boolean refreshCacheFlag)
Set whether the bean finders should refresh the cache with their results or not.
void setRemoteClass(java.lang.Class remoteClass)
Set the class of the remote interface.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DDDefinition

public DDDefinition()

DDDefinition Constructor

See Also:
DDProjectDefinition, DDGenerator

Method Detail

addFinder

public void addFinder(java.lang.String methodName,
                      java.util.Vector methodParamNames,
                      java.util.Vector methodParamTypes,
                      java.lang.String finderType,
                      java.lang.String finderQuery)

Specify a finder for this bean. The finder must exist on the home interface with exactly the same parameters and names as the ones passed to this method. The finder type and finder query arguments must correlate with each other.

These finders are optional if none exist on the home interface. None need be added for the default findByPrimaryKey finder.

Parameters:
methodName - the name of the finder method on the home interface
methodParamNames - the Vector of parameter names (String) in the same order as they appear on the home interface, or null if no parameters apply
methodParamTypes - the Vector of fully-qualified parameter types (String) in the same order as they appear in the home interface, or null if no parameters apply
finderType - the type of finder specified as a constant String
finderQuery - the finder implementation String appropriate to the finder type, or null if READALL or READOBJECT query
See Also:
DDProjectDefinition, DDGenerator

setCacheUsage

public void setCacheUsage(java.lang.String cacheUsageLevel)

Set the cache usage for finders. The possible values are the String equivalents of the constant names specified in the ObjectLevelReadQuery class.

This attribute is optional.

Parameters:
cacheUsageLevel - the constant that determines what level caching is to be used for finders
See Also:
ObjectLevelReadQuery

setCmpFields

public void setCmpFields(java.util.Vector fields)

Set the names of the fields that are container-managed.

This attribute is required for all CMP entity beans.

Parameters:
fields - the collection of Strings that are the field names

setEjbClass

public void setEjbClass(java.lang.Class beanClass)

Set the class of the bean implementation.

This attribute is required for all CMP entity beans.

Parameters:
beanClass - the bean implementation class

setEJBName

public void setEJBName(java.lang.String ejbNameString)

Set the name (identifier) of the bean. This name is used to refer to this bean in the deployment descriptor.

This attribute is required for all CMP entity beans.


setHomeClass

public void setHomeClass(java.lang.Class homeClass)

Set the class of the home interface.

This attribute is required for all CMP entity beans.

Parameters:
homeClass - the home interface class

setJndiName

public void setJndiName(java.lang.String jndiNameString)

Set the name used to store the home interface of the bean in JNDI. This name must be unique for all objects stored in JNDI space.

This attribute is required for all CMP entity beans.

Parameters:
jndiNameString - the name to use when looking up the bean home interface

setPersistenceType

public void setPersistenceType(java.lang.String type)

Set the persistence type that specifies BMP or CMP.

This attribute is required for all CMP entity beans.

Parameters:
type - can be set to either "BEAN" or "CONTAINER"

setPrimKeyClass

public void setPrimKeyClass(java.lang.Class primaryKeyClass)

Set the class of the primary key. This may be a java.lang class, such as java.lang.String, or a special primary key class created exclusively for this bean.

This attribute is required for all CMP entity beans.

Parameters:
primaryKeyClass - the primary key class

setPrimKeyField

public void setPrimKeyField(java.lang.String primaryKeyField)

Set the name of the primary key field on the entity bean.

This attribute is required for all CMP entity beans which do not have compound primary keys.

Parameters:
primaryKeyField - the single primary key field name on the entity bean

setReadOnly

public void setReadOnly(boolean readOnlyFlag)

Set whether the bean is to be read-only or not.

This attribute is optional.

Parameters:
readOnlyFlag - the flag should be set to true if the bean is to be read-only, and false if not

setReentrant

public void setReentrant(boolean reentrantFlag)

Set whether the bean is reentrant or not.

This attribute is required for all CMP entity beans.

Parameters:
reentrantFlag - the flag should be set to true if the bean methods are reentrant, false if they are not

setRefreshCache

public void setRefreshCache(boolean refreshCacheFlag)

Set whether the bean finders should refresh the cache with their results or not.

This attribute is optional.

Parameters:
refreshCacheFlag - the flag should be set to true if the cache is to be refreshed with the results of finders, and false if not

setRemoteClass

public void setRemoteClass(java.lang.Class remoteClass)

Set the class of the remote interface.

This attribute is required for all CMP entity beans.

Parameters:
remoteClass - the remote interface class

Copyright © 1998, 2005 Oracle Corporation. All Rights Reserved.