Class TdbDatabaseClusterDesign
- All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink
,TdbControlObjectProvider
-
Constructor Summary
ConstructorsConstructorDescriptionTdbDatabaseClusterDesign
(TdbSession session) Constructor, creates a new blank containerTdbDatabaseClusterDesign
(TdbSession session, TdbControlObject ob) Constructor, creates a container for the cluster referenced by the provided Control object -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(TdbControlObject ob) Add the database or thesaurus referenced by the provided Control object as a member of this cluster.void
Add a new member to the cluster, by namevoid
Transfer all objects from the current user to a new manager.void
Transfer all objects from one manager to another.void
Transfer ownership of one or more cluster designs from one user to another.void
copy
(String newname, TdbControlObject newobj) Copy the current cluster definition to a new name.void
deepCopy
(String newname, TdbControlObject newobj) Create a deep copy of the current cluster under a new name.void
delete()
Delete the current cluster design from the server.void
Delete the named cluster design from the server.void
Export the current cluster definition to the named file.void
Export the named database cluster design to the named file.void
get()
Retrieve the current cluster's design from the server.void
get
(boolean resolve) Retrieve the current cluster's design from the server.void
Retrieve the named cluster design from the server.void
Retrieve the named cluster design from the server.Return a list of fields common to all databases in the cluster.getCommonFields
(String name) Return a list of fields common to all databases in the cluster.Retrieve any description or comment associated with the database cluster.Return a list of database design objects for all databases in the cluster, with nested clusters resolved.getMemberDesigns
(String name) Return a list of database design objects for all databases in the cluster, with nested clusters resolved.void
importCluster
(String filename, String name) Import a new cluster design from the named file.void
importUpdate
(String filename) Import an update to the current cluster design from the named file.void
importUpdate
(String filename, String name) Import an update to the named cluster design from the named file.boolean
isOwner()
Check if the calling user is the owner of the database cluster.members()
Retrieve the current set of members in the cluster.void
put()
Store the current cluster design to the server.void
Store a new or modified cluster design to the server.void
Remove the referenced Control object member from this cluster.void
Remove a named member from the cluster.void
Rename the current cluster design to a new name.void
setDescription
(String comment) Establish a description or comment to associate with the database cluster.void
setMembers
(TdbControlObjectList members) Establish a new set of members in the cluster.Methods inherited from class com.tietoenator.trip.jxp.session.TdbSerializableObject
getControlObject
Methods inherited from class com.tietoenator.trip.jxp.TdbMessageProvider
codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages
Methods inherited from class com.tietoenator.trip.jxp.session.TdbSessionObject
cancel, getSession, isCancelable, setCancelable
-
Constructor Details
-
TdbDatabaseClusterDesign
Constructor, creates a new blank container- Parameters:
session
- Active session- Throws:
TdbException
-
TdbDatabaseClusterDesign
Constructor, creates a container for the cluster referenced by the provided Control object- Parameters:
session
- Active sessionob
- Control object referencing the cluster desired- Throws:
TdbException
-
-
Method Details
-
members
Retrieve the current set of members in the cluster. This method returns a copy of the member collection. For repeated use, please retain the object returned.- Returns:
- A collection of member references
- Throws:
TdbException
-
setMembers
Establish a new set of members in the cluster. This removes any existing members, does not append to the existing set.- Parameters:
members
- The new membership set for the cluster.- Throws:
TdbException
-
isOwner
public boolean isOwner()Check if the calling user is the owner of the database cluster.- Returns:
- true / false
-
getDescription
Retrieve any description or comment associated with the database cluster.- Returns:
- Cluster comment, if any
-
setDescription
Establish a description or comment to associate with the database cluster.- Parameters:
comment
- Cluster comment
-
add
Add a new member to the cluster, by name- Parameters:
db
- The name of the member to add (either a database or a thesaurus)
-
add
Add the database or thesaurus referenced by the provided Control object as a member of this cluster.- Parameters:
ob
- The Control object reference to add as a member
-
remove
Remove a named member from the cluster.- Parameters:
db
- The name of the member to remove.- Throws:
TdbException
-
remove
Remove the referenced Control object member from this cluster.- Parameters:
ob
- The Control object member to remove.- Throws:
TdbException
-
get
Retrieve the named cluster design from the server.This method causes network I/O.
- Parameters:
name
- The name of the cluster to retrieve- Throws:
TdbException
-
get
Retrieve the named cluster design from the server.This method causes network I/O.
- Parameters:
name
- The name of the cluster to retrieveresolve
- Set to true to resolve nested clusters into their constituent databases. The resulting TdbDatabaseClusterDesign instance will not be possible to update.- Throws:
TdbException
-
get
Retrieve the current cluster's design from the server. This object must have been constructed using a valid Control object reference for this to succeed.- Throws:
TdbException
-
get
Retrieve the current cluster's design from the server. This object must have been constructed using a valid Control object reference for this to succeed.- Parameters:
resolve
- Set to true to resolve nested clusters into their constituent databases. The resulting TdbDatabaseClusterDesign instance will not be possible to update.- Throws:
TdbException
-
put
Store a new or modified cluster design to the server.This method causes network I/O.
- Parameters:
name
- Name of the cluster design to store- Throws:
TdbException
-
put
Store the current cluster design to the server. The design must have been retrieved using theget
method in order for this to succeed.This method causes network I/O.
- Throws:
TdbException
-
export
Export the named database cluster design to the named file.This method causes network I/O.
- Parameters:
filename
- File to which to export the designname
- Design to export- Throws:
TdbException
-
export
Export the current cluster definition to the named file.This method causes network I/O.
- Parameters:
filename
- File to which to export the design- Throws:
TdbException
-
importCluster
Import a new cluster design from the named file.This method causes network I/O.
- Parameters:
filename
- Name of file from which to importname
- Name of cluster design to create- Throws:
TdbException
-
importUpdate
Import an update to the named cluster design from the named file.This method causes network I/O.
- Parameters:
filename
- Name of file from which to importname
- Name of cluster design to update- Throws:
TdbException
-
importUpdate
Import an update to the current cluster design from the named file.This method causes network I/O.
- Parameters:
filename
- Name of file from which to import- Throws:
TdbException
-
delete
Delete the named cluster design from the server.This method causes network I/O.
- Parameters:
name
- Name of cluster design to delete- Throws:
TdbException
-
delete
Delete the current cluster design from the server.This method causes network I/O.
- Throws:
TdbException
-
rename
Rename the current cluster design to a new name.This method causes network I/O.
- Parameters:
newname
- The new name for the cluster design- Throws:
TdbException
-
copy
Copy the current cluster definition to a new name.This method causes network I/O.
- Parameters:
newname
- Name of new copynewobj
- If not null on input, this object will contain the Control reference for the new cluster on successful completion- Throws:
TdbException
-
deepCopy
Create a deep copy of the current cluster under a new name. Deep copying maintains access rights along with the design.This method causes network I/O.
- Parameters:
newname
- Name of new object to createnewobj
- If not null on input, this object will contain the Control reference for the new cluster on successful completion- Throws:
TdbException
-
changeMgr
Transfer ownership of one or more cluster designs from one user to another.This method causes network I/O.
- Parameters:
newmgr
- The name of the new owneroldmgr
- The name of the existing owner; if this is null, the name of the calling user is assumed; if this is not null, and is not the name of the calling user, the calling user must be the SYSTEM username
- The name of the object to transfer, or "*" for all- Throws:
TdbException
-
changeMgr
Transfer all objects from one manager to another.This method causes network I/O.
- Parameters:
newmgr
- Name of the new manageroldmgr
- Name of the current manager; if this is not the name of the calling user, the calling must be the SYSTEM user for this to succeed- Throws:
TdbException
-
changeMgr
Transfer all objects from the current user to a new manager.This method causes network I/O.
- Parameters:
newmgr
- Name of the new manager- Throws:
TdbException
-
getMemberDesigns
Return a list of database design objects for all databases in the cluster, with nested clusters resolved. Repeated calls with the same instance of TdbDatabaseClusterDesign will not cause any additional network I/O. If the information on database designs in a cluster is required repeatedly within the same session, the TdbDatabaseClusterDesign instance should be cached in order to reduce potentially expensive network I/O.- Throws:
TdbException
-
getMemberDesigns
Return a list of database design objects for all databases in the cluster, with nested clusters resolved. The cluster design must have been loaded prior to calling this method (alternatively use the getMemberDesigns(string) overload). Repeated calls with the same instance of TdbDatabaseClusterDesign will not cause any additional network I/O. If the information on database designs in a cluster is required repeatedly within the same session, the TdbDatabaseClusterDesign instance should be cached in order to reduce potentially expensive network I/O.- Throws:
TdbException
-
getCommonFields
Return a list of fields common to all databases in the cluster.Fields are considered common if they have the same name, same type and are in part or head record respectively.
Repeated calls with the same instance of TdbDatabaseClusterDesign will not cause any additional network I/O. If the information on common fields in a cluster is required repeatedly within the same session, the TdbDatabaseClusterDesign instance should be cached in order to reduce potentially expensive network I/O.
- Throws:
TdbException
-
getCommonFields
Return a list of fields common to all databases in the cluster.The cluster design must have been loaded prior to calling this method (alternatively use the getCommonFields(string) overload).
Fields are considered common if they have the same name, same type and are in part or head record respectively.
Repeated calls with the same instance of TdbDatabaseClusterDesign will not cause any additional network I/O. If the information on common fields in a cluster is required repeatedly within the same session, the TdbDatabaseClusterDesign instance should be cached in order to reduce potentially expensive network I/O.
- Throws:
TdbException
-