public final class JDBCRelationMetaData extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JDBCRelationMetaData.MappingStyle |
Constructor and Description |
---|
JDBCRelationMetaData()
Parse only constructor.
|
JDBCRelationMetaData(JDBCApplicationMetaData jdbcApplication,
JDBCRelationMetaData defaultValues) |
JDBCRelationMetaData(JDBCApplicationMetaData jdbcApplication,
ParsedEntity defaultEntity,
JDBCRelationMetaData defaultValues) |
JDBCRelationMetaData(JDBCApplicationMetaData jdbcApplication,
ParsedRelationship parsedRelationship,
JDBCRelationMetaData defaultValues) |
JDBCRelationMetaData(JDBCApplicationMetaData jdbcApplication,
org.jboss.metadata.ejb.spec.RelationMetaData relationMetaData)
Constructs jdbc relation meta data with the data from the relation
metadata loaded from the ejb-jar.xml file.
|
Modifier and Type | Method and Description |
---|---|
void |
addPostTableCreate(String command) |
boolean |
getAlterTable()
Should the relation table be altered on deploy.
|
boolean |
getCreateTable()
Should the relation table be created on startup.
|
String |
getDataSourceName()
Gets the name of the datasource in jndi for this entity
|
String |
getDefaultTableName()
Gets the name of the relation table.
|
List<String> |
getDefaultTablePostCreateCmd()
Gets the (user-defined) SQL commands that should be issued to the db
after table creation.
|
JDBCRelationshipRoleMetaData |
getLeftRelationshipRole()
Gets the left jdbc relationship role.
|
JDBCRelationshipRoleMetaData |
getOtherRelationshipRole(JDBCRelationshipRoleMetaData role)
Gets the relationship role related to the specified role.
|
int |
getReadTimeOut()
Gets the read time out length.
|
String |
getRelationName()
Gets the relation name.
|
boolean |
getRemoveTable()
Should the relation table be removed on shutdown.
|
JDBCRelationshipRoleMetaData |
getRightRelationshipRole()
Gets the right jdbc relationship role.
|
JDBCTypeMappingMetaData |
getTypeMapping()
Gets the jdbc type mapping for this entity
|
boolean |
hasPrimaryKeyConstraint()
When the relation table is created, should it have a primary key
constraint.
|
boolean |
hasRowLocking()
Should select queries do row locking
|
boolean |
isForeignKeyMappingStyle()
Should this relation use foreign keys for storage.
|
boolean |
isReadOnly()
Is this relation read-only?
|
boolean |
isTableCreated()
Does the table exist yet? This does not mean that table has been created
by the application, or the the database metadata has been checked for the
existence of the table, but that at this point the table is assumed to
exist.
|
boolean |
isTableDropped() |
boolean |
isTableMappingStyle()
Should this relation be mapped to a relation table.
|
void |
setAlterTable(boolean alterTable) |
void |
setCreateTable(boolean createTable) |
void |
setDatasourceMapping(JDBCTypeMappingMetaData datasourceMapping) |
void |
setDataSourceName(String dataSourceName) |
void |
setLeft(JDBCRelationshipRoleMetaData jdbcRelationshipRoleMetaData) |
void |
setMappingStyle(JDBCRelationMetaData.MappingStyle mappingStyle) |
void |
setPrimaryKeyConstraint(boolean primaryKeyConstraint) |
void |
setReadOnly(boolean readOnly) |
void |
setReadTimeOut(int readTimeOut) |
void |
setRelationName(String relationName) |
void |
setRemoveTable(boolean removeTable) |
void |
setRight(JDBCRelationshipRoleMetaData jdbcRelationshipRoleMetaData) |
void |
setRowLocking(boolean rowLocking) |
void |
setTableCreated() |
void |
setTableDropped()
Sets table dropped flag.
|
void |
setTableName(String tableName) |
public JDBCRelationMetaData()
public JDBCRelationMetaData(JDBCApplicationMetaData jdbcApplication, org.jboss.metadata.ejb.spec.RelationMetaData relationMetaData)
jdbcApplication
- used to retrieve the entities of this relationrelationMetaData
- relation meta data loaded from the ejb-jar.xml
filepublic JDBCRelationMetaData(JDBCApplicationMetaData jdbcApplication, JDBCRelationMetaData defaultValues)
public JDBCRelationMetaData(JDBCApplicationMetaData jdbcApplication, ParsedEntity defaultEntity, JDBCRelationMetaData defaultValues)
public JDBCRelationMetaData(JDBCApplicationMetaData jdbcApplication, ParsedRelationship parsedRelationship, JDBCRelationMetaData defaultValues)
public JDBCRelationshipRoleMetaData getLeftRelationshipRole()
public JDBCRelationshipRoleMetaData getRightRelationshipRole()
public JDBCRelationshipRoleMetaData getOtherRelationshipRole(JDBCRelationshipRoleMetaData role)
role
- the relationship role that the related role is desiredpublic String getRelationName()
public boolean isTableMappingStyle()
public boolean isForeignKeyMappingStyle()
public String getDataSourceName()
public String getDefaultTableName()
public List<String> getDefaultTablePostCreateCmd()
public boolean isTableCreated()
public void setTableCreated()
public void setTableDropped()
public boolean isTableDropped()
public boolean getCreateTable()
public boolean getRemoveTable()
public boolean getAlterTable()
public boolean hasPrimaryKeyConstraint()
public boolean isReadOnly()
public int getReadTimeOut()
public boolean hasRowLocking()
public void setRelationName(String relationName)
public void setReadOnly(boolean readOnly)
public void setReadTimeOut(int readTimeOut)
public void setPrimaryKeyConstraint(boolean primaryKeyConstraint)
public void setTableName(String tableName)
public void setDatasourceMapping(JDBCTypeMappingMetaData datasourceMapping)
public void setDataSourceName(String dataSourceName)
public void setCreateTable(boolean createTable)
public void setRemoveTable(boolean removeTable)
public void setAlterTable(boolean alterTable)
public void setRowLocking(boolean rowLocking)
public void setMappingStyle(JDBCRelationMetaData.MappingStyle mappingStyle)
public void addPostTableCreate(String command)
public JDBCTypeMappingMetaData getTypeMapping()
public void setLeft(JDBCRelationshipRoleMetaData jdbcRelationshipRoleMetaData)
public void setRight(JDBCRelationshipRoleMetaData jdbcRelationshipRoleMetaData)
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.