Methods Summary |
---|
public java.lang.String | getPersistenceType()Returns the persistence type for this entity bean. Defaults to BEAN_PERSISTENCE.
if (this.persistenceType == null) {
this.persistenceType = BEAN_PERSISTENCE;
}
return this.persistenceType;
|
public java.lang.String | getPrimaryKeyClassName()Return the classname of the primary key for this bean, or the empty
string if none has been set.
if (this.primaryKeyClassName == null) {
this.primaryKeyClassName = Object.class.getName();
}
return this.primaryKeyClassName;
|
public java.lang.String | getReentrant()
if (this.isReentrant()) {
return TRUE;
} else {
return FALSE;
}
|
public java.lang.String | getTransactionType()Gets the container transaction type for this entity bean. Entity
beans always have CONTAINER_TRANSACTION_TYPE transaction type.
return super.transactionType;
|
public java.lang.String | getType()Returns the type of this bean. EjbEntityDescriptor.TYPE
return TYPE;
|
public boolean | isReentrant()Return true if this entity bean is reentrant, false else.
return this.isReentrant;
|
public void | print(java.lang.StringBuffer toStringBuffer)Return my formatted string representation.
super.print(toStringBuffer);
toStringBuffer.append("\n Entity descriptor");
toStringBuffer.append("\n isReentrant ").append(isReentrant);
toStringBuffer.append("\n primaryKeyClassName ").append(primaryKeyClassName);
toStringBuffer.append("\n persistenceType ").append(persistenceType);
|
public void | replaceEntityDescriptor(com.sun.enterprise.deployment.EjbEntityDescriptor oldEntityDesc)Replace all pointers to the old EntityDescriptor in this app
with myself. Used when user switches from BMP to CMP or vice versa
in deploytool wizard.
// first replace in bundleDesc
EjbBundleDescriptor bundle = oldEntityDesc.getEjbBundleDescriptor();
bundle.replaceEjb(oldEntityDesc, this);
// now replace in all EjbReferences to the old Ejb in this app
Iterator refs = oldEntityDesc.getAllEjbReferencers().iterator();
while ( refs.hasNext() ) {
EjbReferenceDescriptor ref = (EjbReferenceDescriptor)refs.next();
ref.setEjbDescriptor(this);
}
|
public void | setPersistenceType(java.lang.String persistenceType)Sets the persistence type for this entity bean. Allowable values are BEAN_PERSISTENCE
or CONTAINER_PERSISTENCE, or else an IllegalArgumentException is thrown.
boolean isValidChange = (BEAN_PERSISTENCE.equals(persistenceType) || CONTAINER_PERSISTENCE.equals(persistenceType));
if (isValidChange || !this.isBoundsChecking()) {
this.persistenceType = persistenceType;
super.changed();
} else {
//_logger.log(Level.FINE,"Warning " + persistenceType + " is not an allowed persistence type");
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionpersistenceisnotallowedtype",
"{0} is not an allowed persistence type", new Object[] {persistenceType}));
}
|
public void | setPrimaryKeyClassName(java.lang.String primaryKeyClassName)Set the classname of the primary key used by this bean.
this.primaryKeyClassName = primaryKeyClassName;
super.changed();
|
public void | setReentrant(java.lang.String reentrantString)
if (TRUE.equalsIgnoreCase(reentrantString)) {
this.setReentrant(true);
return;
}
if (FALSE.equalsIgnoreCase(reentrantString)) {
this.setReentrant(false);
return;
}
if (this.isBoundsChecking()) {
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionstringnotlegalvalue",
"{0} is not a legal value for entity reentrancy", new Object[] {reentrantString}));
}
|
public void | setReentrant(boolean isReentrant)Sets the isReentrant flag for this bean.
this.isReentrant = isReentrant;
super.changed();
|
public void | setTransactionType(java.lang.String transactionType)Sets the transaction type for this entity bean.
Throws an illegal argument exception if this type is not
CONTAINER_TRANSACTION_TYPE.
if (!CONTAINER_TRANSACTION_TYPE.equals(transactionType)
&& this.isBoundsChecking()) {
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionentitybeancanonlyhavecntnrtxtype",
"Entity beans can only have Container transaction type. The type was being set to {0}", new Object[] {transactionType}));
}
super.transactionType = transactionType;
|
public void | setType(java.lang.String type)Sets my type String.
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptioncannotsettypeonentitybean",
"Cannon set type on an entity bean"));
|