public abstract class DatabaseProfileManager extends Object implements ProfileManager
Constructor and Description |
---|
DatabaseProfileManager(Properties props)
DatabaseProfileManager
|
DatabaseProfileManager(Properties props,
Connection conn) |
Modifier and Type | Method and Description |
---|---|
abstract void |
add(Connection conn,
Profile profile) |
void |
add(Profile profile)
Add a profile into the set of profiles managed by this profile server.
|
void |
addAll(Collection collection)
Add all of the profiles in the given collection to the set managed by this
server.
|
abstract void |
addAll(Connection conn,
Collection collection) |
void |
clear()
Clear all profiles.
|
abstract void |
clear(Connection conn) |
boolean |
contains(Profile profile)
Tell if the given profile is managed by this server.
|
boolean |
containsAll(Collection collection)
Tell if the given collection of profiles are managed by this server.
|
abstract List |
findProfiles(Connection conn,
XMLQuery query) |
List |
findProfiles(XMLQuery query)
findProfiles
Returns a list of matching profiles
|
abstract Profile |
get(Connection conn,
String profID) |
Profile |
get(String profId)
Get a profile.
|
Collection |
getAll()
Get all profiles.
|
abstract List |
getProfiles(Connection conn)
Dump profiles in the database.
|
boolean |
isEmpty()
Tell if the set of profiles managed by this server is empty.
|
Iterator |
iterator()
Iterate over the available profiles.
|
protected static Connection |
openConnection(Properties props) |
abstract boolean |
remove(Connection conn,
String profId) |
abstract boolean |
remove(Connection conn,
String profId,
String version) |
boolean |
remove(String profId)
Remove the profile with the given ID.
|
boolean |
remove(String profId,
String version)
Remove the profile with the given ID.
|
abstract void |
replace(Connection conn,
Profile profile) |
void |
replace(Profile profile)
Replace a profile into the set of profiles managed by this profile server.
|
int |
size()
Get the size of the set of profiles managed by this server.
|
abstract int |
size(Connection conn) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getID
public DatabaseProfileManager(Properties props) throws SQLException, Exception
SQLException
Exception
public DatabaseProfileManager(Properties props, Connection conn)
public abstract List getProfiles(Connection conn) throws ProfileException
ProfileException
- If an error occurs.public List findProfiles(XMLQuery query) throws DOMException, ProfileException
findProfiles
in interface ProfileHandler
query
- Search criteria.Profile
objects.ProfileException
- If any other error occurs.DOMException
public abstract List findProfiles(Connection conn, XMLQuery query) throws DOMException, ProfileException
DOMException
ProfileException
public void add(Profile profile) throws ProfileException
ProfileManager
add
in interface ProfileManager
profile
- The profile to add or replace.ProfileException
- If any error occurs.public abstract void add(Connection conn, Profile profile) throws ProfileException
ProfileException
public void addAll(Collection collection) throws ProfileException
ProfileManager
addAll
in interface ProfileManager
collection
- Collection of Profile
s to add.ProfileException
- If any error occurs.public abstract void addAll(Connection conn, Collection collection) throws ProfileException
ProfileException
public abstract void clear(Connection conn) throws ProfileException
ProfileException
public void clear() throws ProfileException
ProfileManager
clear
in interface ProfileManager
ProfileException
- If any error occurs.public boolean contains(Profile profile) throws ProfileException
ProfileManager
contains
in interface ProfileManager
profile
- The profile to check.ProfileException
- If any error occurs.public boolean containsAll(Collection collection) throws ProfileException
ProfileManager
containsAll
in interface ProfileManager
collection
- The collection of Profile
s to check.Profile
in collection are present in
the server, false otherwise.ProfileException
- If any error occurs.public abstract Profile get(Connection conn, String profID) throws ProfileException
ProfileException
public Profile get(String profId) throws ProfileException
ProfileHandler
get
in interface ProfileHandler
profId
- ID of the profile to get.ProfileException
- If any error occurs.public Collection getAll() throws ProfileException
ProfileManager
getAll
in interface ProfileManager
ProfileException
- If any error occurs.public boolean isEmpty() throws ProfileException
ProfileManager
isEmpty
in interface ProfileManager
ProfileException
- If any error occurs.public Iterator iterator() throws ProfileException
ProfileManager
next
yields a copy of the next Profile
object
managed by this server. Updates to profile objects are not backed by the
server; make your updates and then call ProfileManager.add(org.apache.oodt.profile.Profile)
.iterator
in interface ProfileManager
Profile
s.ProfileException
- If any error occurs.public abstract boolean remove(Connection conn, String profId, String version) throws ProfileException
ProfileException
public abstract boolean remove(Connection conn, String profId) throws ProfileException
ProfileException
public boolean remove(String profId, String version) throws ProfileException
ProfileManager
remove
in interface ProfileManager
profId
- What profile to remove.version
- What version of the the profile identified by profID to remove.ProfileException
- If any error occurs.public boolean remove(String profId) throws ProfileException
ProfileManager
remove
in interface ProfileManager
profId
- ID of profile to remove.ProfileException
- If any error occurs.public int size() throws ProfileException
ProfileManager
size
in interface ProfileManager
ProfileException
- If any error occurs.public abstract int size(Connection conn) throws ProfileException
ProfileException
public void replace(Profile profile) throws ProfileException
ProfileManager
replace
in interface ProfileManager
profile
- The profile to add or replace.ProfileException
- If any error occurs.public abstract void replace(Connection conn, Profile profile) throws ProfileException
ProfileException
protected static Connection openConnection(Properties props) throws SQLException, ProfileException
SQLException
ProfileException
Copyright © 1999-2015 Apache OODT. All Rights Reserved.