|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.access.DataNode
public class DataNode
Describes a single physical data source. This can be a database server, LDAP server, etc.
For more information see Cayenne User Guide.
Field Summary | |
---|---|
protected DbAdapter |
adapter
|
protected Map |
dataMaps
|
protected DataSource |
dataSource
|
protected String |
dataSourceFactory
|
protected String |
dataSourceLocation
|
protected EntityResolver |
entityResolver
|
protected EntitySorter |
entitySorter
|
protected String |
name
|
Constructor Summary | |
---|---|
DataNode()
Creates a new unnamed DataNode. |
|
DataNode(String name)
Creates a new DataNode, assigning it a name. |
Method Summary | |
---|---|
void |
addDataMap(DataMap map)
Adds a DataMap to be handled by this node. |
DbAdapter |
getAdapter()
Returns DbAdapter object. |
Collection |
getDataMaps()
Returns an unmodifiable collection of DataMaps handled by this DataNode. |
DataSource |
getDataSource()
Returns DataSource used by this DataNode to obtain connections. |
String |
getDataSourceFactory()
Returns a name of DataSourceFactory class for this node. |
String |
getDataSourceLocation()
Returns a location of DataSource of this node. |
EntityResolver |
getEntityResolver()
Returns EntityResolver that handles DataMaps of this node. |
EntitySorter |
getEntitySorter()
Returns EntitySorter used by the DataNode. |
String |
getName()
Returns node name. |
DataNode |
lookupDataNode(DataMap dataMap)
Returns a DataNode that should hanlde queries for all DataMap components. |
void |
performQueries(Collection queries,
OperationObserver callback)
Runs queries using Connection obtained from internal DataSource. |
void |
removeDataMap(String mapName)
|
void |
setAdapter(DbAdapter adapter)
|
void |
setDataMaps(Collection dataMaps)
|
void |
setDataSource(DataSource dataSource)
|
void |
setDataSourceFactory(String dataSourceFactory)
|
void |
setDataSourceLocation(String dataSourceLocation)
|
void |
setEntityResolver(EntityResolver entityResolver)
Sets EntityResolver. |
void |
setEntitySorter(EntitySorter entitySorter)
Sets an EntitySorter that is used to order objects on commit. |
void |
setName(String name)
|
void |
shutdown()
Tries to close JDBC connections opened by this node's data source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String name
protected DataSource dataSource
protected DbAdapter adapter
protected String dataSourceLocation
protected String dataSourceFactory
protected EntityResolver entityResolver
protected EntitySorter entitySorter
protected Map dataMaps
Constructor Detail |
---|
public DataNode()
public DataNode(String name)
Method Detail |
---|
public String getName()
public void setName(String name)
public String getDataSourceLocation()
public void setDataSourceLocation(String dataSourceLocation)
public String getDataSourceFactory()
public void setDataSourceFactory(String dataSourceFactory)
public Collection getDataMaps()
public void setDataMaps(Collection dataMaps)
public void addDataMap(DataMap map)
public void removeDataMap(String mapName)
public DataSource getDataSource()
public void setDataSource(DataSource dataSource)
public DbAdapter getAdapter()
public void setAdapter(DbAdapter adapter)
public DataNode lookupDataNode(DataMap dataMap)
public void performQueries(Collection queries, OperationObserver callback)
performQueries
in interface QueryEngine
public EntityResolver getEntityResolver()
getEntityResolver
in interface QueryEngine
public void setEntityResolver(EntityResolver entityResolver)
public EntitySorter getEntitySorter()
public void setEntitySorter(EntitySorter entitySorter)
public void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |