org.jboss.ejb.plugins.cmp.jdbc2.schema
Class EntityTable

java.lang.Object
  extended by org.jboss.ejb.plugins.cmp.jdbc2.schema.EntityTable
All Implemented Interfaces:
Table

public class EntityTable
extends Object
implements Table

todo refactor optimistic locking

Version:
$Revision: 86010 $
Author:
Alexey Loubyansky, Galder Zamarreno

Nested Class Summary
static interface EntityTable.CommitStrategy
           
 class EntityTable.ForeignKeyConstraint
           
 class EntityTable.Row
           
 class EntityTable.View
           
 
Constructor Summary
EntityTable(JDBCEntityMetaData metadata, JDBCEntityBridge2 entity, Schema schema, int tableId)
           
 
Method Summary
 void addField()
           
 EntityTable.ForeignKeyConstraint addFkConstraint(JDBCCMPFieldBridge2[] fkFields, EntityTable referenced)
           
 int addVersionField()
           
 StringBuffer appendColumnNames(JDBCCMPFieldBridge2[] fields, String alias, StringBuffer buf)
           
 Table.View createView(Transaction tx)
           
 DataSource getDataSource()
           
 EntityTable.Row getRow(Object id)
           
 int getTableId()
           
 String getTableName()
           
 boolean hasRow(Object id)
           
 EntityTable.Row loadRow(Object id)
           
 Object loadRow(ResultSet rs, boolean searchableOnly)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityTable

public EntityTable(JDBCEntityMetaData metadata,
                   JDBCEntityBridge2 entity,
                   Schema schema,
                   int tableId)
            throws DeploymentException
Throws:
DeploymentException
Method Detail

start

public void start()
           throws DeploymentException
Throws:
DeploymentException

stop

public void stop()
          throws Exception
Throws:
Exception

appendColumnNames

public StringBuffer appendColumnNames(JDBCCMPFieldBridge2[] fields,
                                      String alias,
                                      StringBuffer buf)

addField

public void addField()

addVersionField

public int addVersionField()

addFkConstraint

public EntityTable.ForeignKeyConstraint addFkConstraint(JDBCCMPFieldBridge2[] fkFields,
                                                        EntityTable referenced)

getDataSource

public DataSource getDataSource()

loadRow

public Object loadRow(ResultSet rs,
                      boolean searchableOnly)

getRow

public EntityTable.Row getRow(Object id)

hasRow

public boolean hasRow(Object id)

loadRow

public EntityTable.Row loadRow(Object id)
                        throws SQLException
Throws:
SQLException

getTableId

public int getTableId()
Specified by:
getTableId in interface Table

getTableName

public String getTableName()
Specified by:
getTableName in interface Table

createView

public Table.View createView(Transaction tx)
Specified by:
createView in interface Table


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.