站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 server API Documentation 英文版文档

JDBCCMPFieldBridge2 (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


org.jboss.ejb.plugins.cmp.jdbc2.bridge
Class JDBCCMPFieldBridge2

java.lang.Object
  extended byorg.jboss.ejb.plugins.cmp.jdbc2.bridge.JDBCCMPFieldBridge2
All Implemented Interfaces:
CMPFieldBridge, FieldBridge, JDBCFieldBridge

public class JDBCCMPFieldBridge2
extends Object
implements CMPFieldBridge, JDBCFieldBridge

Version:
$Revision: 1.3 $
Author:
Alexey Loubyansky

Constructor Summary
JDBCCMPFieldBridge2(JDBCCMPFieldBridge2 cmpField, JDBCCMPFieldBridge2 relatedPKField)
           
JDBCCMPFieldBridge2(JDBCStoreManager2 manager, JDBCEntityBridge2 entity, JDBCCMPFieldMetaData metadata, int rowIndex)
           
 
Method Summary
 String getColumnName()
           
 String getFieldName()
          Gets the name of this field.
 Class getFieldType()
           
 Object getInstanceValue(EntityEnterpriseContext ctx)
          Gets the internal value of this field without user level checks.
 JDBCType getJDBCType()
          Gets the JDBC type of this field.
 JDBCEntityPersistenceStore getManager()
           
 Object getPrimaryKeyValue(Object primaryKey)
           
 int getRowIndex()
           
 Object getValue(EntityEnterpriseContext ctx)
          Gets the value of this field for the specified instance context.
 int getVersionIndex()
           
 void initInstance(EntityEnterpriseContext ctx)
          Set CMPFieldValue to Java default value (i.e., 0 or null).
 void initVersion()
           
 boolean isCMPField()
           
 boolean isDirty(EntityEnterpriseContext ctx)
          Has the value of this field changes since the last time clean was called.
 boolean isLoaded(EntityEnterpriseContext ctx)
          Has the data been loaded?
 boolean isPrimaryKeyMember()
          Is this field a member of the primary key.
 boolean isReadOnly()
          Is this field read only.
 boolean isReadTimedOut(EntityEnterpriseContext ctx)
          Has current data read timed out?
 Object loadArgumentResults(ResultSet rs, int parameterIndex)
           
 int loadArgumentResults(ResultSet rs, int parameterIndex, Object[] argumentRef)
          Loads the value of this cmp field from result set into argument referance.
 int loadInstanceResults(ResultSet rs, int parameterIndex, EntityEnterpriseContext ctx)
          Loads the data from result set into the instance associated with the specified context.
 void resetPersistenceContext(EntityEnterpriseContext ctx)
          Resets any persistence data maintained in the context.
 int setArgumentParameters(PreparedStatement ps, int parameterIndex, Object arg)
           
 void setClean(EntityEnterpriseContext ctx)
          Mark this field as clean.
 int setInstanceParameters(PreparedStatement ps, int parameterIndex, EntityEnterpriseContext ctx)
          Sets the prepared statement parameters with the data from the instance associated with the context.
 void setInstanceValue(EntityEnterpriseContext ctx, Object value)
          Sets the internal value of this field without user level checks.
 Object setPrimaryKeyValue(Object primaryKey, Object value)
           
 void setValue(EntityEnterpriseContext ctx, Object value)
          Sets the value of this field for the specified instance context.
 void setValueInternal(EntityEnterpriseContext ctx, Object value, boolean makeDirty)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCCMPFieldBridge2

public JDBCCMPFieldBridge2(JDBCStoreManager2 manager,
                           JDBCEntityBridge2 entity,
                           JDBCCMPFieldMetaData metadata,
                           int rowIndex)
                    throws org.jboss.deployment.DeploymentException

JDBCCMPFieldBridge2

public JDBCCMPFieldBridge2(JDBCCMPFieldBridge2 cmpField,
                           JDBCCMPFieldBridge2 relatedPKField)
Method Detail

initVersion

public void initVersion()

getVersionIndex

public int getVersionIndex()

getColumnName

public String getColumnName()

setPrimaryKeyValue

public Object setPrimaryKeyValue(Object primaryKey,
                                 Object value)
                          throws IllegalArgumentException
Throws:
IllegalArgumentException

setValueInternal

public void setValueInternal(EntityEnterpriseContext ctx,
                             Object value,
                             boolean makeDirty)

setArgumentParameters

public int setArgumentParameters(PreparedStatement ps,
                                 int parameterIndex,
                                 Object arg)

loadArgumentResults

public Object loadArgumentResults(ResultSet rs,
                                  int parameterIndex)
                           throws IllegalArgumentException
Throws:
IllegalArgumentException

getRowIndex

public int getRowIndex()

getManager

public JDBCEntityPersistenceStore getManager()
Specified by:
getManager in interface JDBCFieldBridge

initInstance

public void initInstance(EntityEnterpriseContext ctx)
Description copied from interface: JDBCFieldBridge
Set CMPFieldValue to Java default value (i.e., 0 or null).

Specified by:
initInstance in interface JDBCFieldBridge

resetPersistenceContext

public void resetPersistenceContext(EntityEnterpriseContext ctx)
Description copied from interface: JDBCFieldBridge
Resets any persistence data maintained in the context.

Specified by:
resetPersistenceContext in interface JDBCFieldBridge

setInstanceParameters

public int setInstanceParameters(PreparedStatement ps,
                                 int parameterIndex,
                                 EntityEnterpriseContext ctx)
Description copied from interface: JDBCFieldBridge
Sets the prepared statement parameters with the data from the instance associated with the context.

Specified by:
setInstanceParameters in interface JDBCFieldBridge

getInstanceValue

public Object getInstanceValue(EntityEnterpriseContext ctx)
Description copied from interface: JDBCFieldBridge
Gets the internal value of this field without user level checks.

Specified by:
getInstanceValue in interface JDBCFieldBridge
Parameters:
ctx - the context for which this field's value should be fetched
Returns:
the value of this field

setInstanceValue

public void setInstanceValue(EntityEnterpriseContext ctx,
                             Object value)
Description copied from interface: JDBCFieldBridge
Sets the internal value of this field without user level checks.

Specified by:
setInstanceValue in interface JDBCFieldBridge
Parameters:
ctx - the context for which this field's value should be set
value - the new value of this field

loadInstanceResults

public int loadInstanceResults(ResultSet rs,
                               int parameterIndex,
                               EntityEnterpriseContext ctx)
Description copied from interface: JDBCFieldBridge
Loads the data from result set into the instance associated with the specified context.

Specified by:
loadInstanceResults in interface JDBCFieldBridge

loadArgumentResults

public int loadArgumentResults(ResultSet rs,
                               int parameterIndex,
                               Object[] argumentRef)
Description copied from interface: JDBCFieldBridge
Loads the value of this cmp field from result set into argument referance.

Specified by:
loadArgumentResults in interface JDBCFieldBridge

isDirty

public boolean isDirty(EntityEnterpriseContext ctx)
Description copied from interface: JDBCFieldBridge
Has the value of this field changes since the last time clean was called.

Specified by:
isDirty in interface JDBCFieldBridge

setClean

public void setClean(EntityEnterpriseContext ctx)
Description copied from interface: JDBCFieldBridge
Mark this field as clean.

Specified by:
setClean in interface JDBCFieldBridge

isCMPField

public boolean isCMPField()
Specified by:
isCMPField in interface JDBCFieldBridge

isPrimaryKeyMember

public boolean isPrimaryKeyMember()
Description copied from interface: JDBCFieldBridge
Is this field a member of the primary key.

Specified by:
isPrimaryKeyMember in interface JDBCFieldBridge
Returns:
true if this field is a member of the primary key

isReadOnly

public boolean isReadOnly()
Description copied from interface: JDBCFieldBridge
Is this field read only.

Specified by:
isReadOnly in interface JDBCFieldBridge
Returns:
true if this field is read only

isReadTimedOut

public boolean isReadTimedOut(EntityEnterpriseContext ctx)
Description copied from interface: JDBCFieldBridge
Has current data read timed out?

Specified by:
isReadTimedOut in interface JDBCFieldBridge

isLoaded

public boolean isLoaded(EntityEnterpriseContext ctx)
Description copied from interface: JDBCFieldBridge
Has the data been loaded?

Specified by:
isLoaded in interface JDBCFieldBridge

getJDBCType

public JDBCType getJDBCType()
Description copied from interface: JDBCFieldBridge
Gets the JDBC type of this field.

Specified by:
getJDBCType in interface JDBCFieldBridge

getPrimaryKeyValue

public Object getPrimaryKeyValue(Object primaryKey)
                          throws IllegalArgumentException
Specified by:
getPrimaryKeyValue in interface JDBCFieldBridge
Throws:
IllegalArgumentException

getFieldName

public String getFieldName()
Description copied from interface: FieldBridge
Gets the name of this field.

Specified by:
getFieldName in interface FieldBridge
Returns:
the name of this field

getValue

public Object getValue(EntityEnterpriseContext ctx)
Description copied from interface: FieldBridge
Gets the value of this field for the specified instance context.

Specified by:
getValue in interface FieldBridge
Parameters:
ctx - the context for which this field's value should be fetched
Returns:
the value of this field

setValue

public void setValue(EntityEnterpriseContext ctx,
                     Object value)
Description copied from interface: FieldBridge
Sets the value of this field for the specified instance context.

Specified by:
setValue in interface FieldBridge
Parameters:
ctx - the context for which this field's value should be set
value - the new value of this field

getFieldType

public Class getFieldType()
Specified by:
getFieldType in interface CMPFieldBridge


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.