Class ProfileDataCollection
- java.lang.Object
-
- com.opencloud.slee.profile.ProfileDataCollection
-
- All Implemented Interfaces:
Serializable
public final class ProfileDataCollection extends Object implements Serializable
A
ProfileDataCollection
is a collection of exported profile data.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProfileDataCollection.Attribute
Class representing a profile table attribute description.static class
ProfileDataCollection.AttributeValue
Class representing an exported profile attribute value.static class
ProfileDataCollection.MappedAttributeValue
static class
ProfileDataCollection.Profile
Class representing a profile.
-
Constructor Summary
Constructors Constructor Description ProfileDataCollection(String tableName, ProfileDataCollection.Attribute[] attrs)
Create a new profile data collection to store exported profile table state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProfile(ProfileDataCollection.Profile profile)
Add a profile to the collection.void
clearProfiles()
Remove all the profiles stored in this collection.ProfileDataCollection.Attribute[]
getAttributes()
Get the profile attribute descriptions for the profile table.Iterator<ProfileDataCollection.Profile>
getProfiles()
Get an iterator over the profiles stored in this collection.String
getProfileTableName()
Get the name of rhe profile table associated with this profile data collection.int
numProfiles()
Get the number of profiles stored in this collection.boolean
replaceAll()
Determine if the global "create means replace" flag has been set for this profile data collection.void
setReplaceAll(boolean replaceAll)
Set the global "create means replace" flag for profile data contained in this profile data collection.String
toString()
Convert the profile data collection into a human-readable string form, including profile table name, profile table schema, profiles, and profile attributes.
-
-
-
Constructor Detail
-
ProfileDataCollection
public ProfileDataCollection(String tableName, ProfileDataCollection.Attribute[] attrs)
Create a new profile data collection to store exported profile table state.
- Parameters:
tableName
- the name of the profile table when the profiles have been exported from or will be imported to.attrs
- the specification of the profile table attributes.- Throws:
NullPointerException
- is either argument is null.
-
-
Method Detail
-
getProfileTableName
public String getProfileTableName()
Get the name of rhe profile table associated with this profile data collection. For data generated from a profile export, this returns the name of the profile table the data was extracted from. For data being imported, this returns the name of the profile table the data will be imported into.
- Returns:
- the profile table name.
-
getAttributes
public ProfileDataCollection.Attribute[] getAttributes()
Get the profile attribute descriptions for the profile table. These attributes represent the (expected) schema of the profile table.
- Returns:
- the profile attribute descriptions.
-
setReplaceAll
public void setReplaceAll(boolean replaceAll)
Set the global "create means replace" flag for profile data contained in this profile data collection. If this flag is set to
true
, then profile data will replace an existing profile, where present, rather than being skipped over.- Parameters:
replaceAll
- the new value of the flag.- See Also:
replaceAll
-
replaceAll
public boolean replaceAll()
Determine if the global "create means replace" flag has been set for this profile data collection.
- Returns:
- the value of the flag.
- See Also:
setReplaceAll(boolean)
-
addProfile
public void addProfile(ProfileDataCollection.Profile profile)
Add a profile to the collection. If the profile name is null, indicating the default profile, it is added to the head of the list, otherwise the profile is appended to the end of the list.
- Parameters:
profile
- the profile to add.- Throws:
NullPointerException
- ifprofile
isnull
.
-
getProfiles
public Iterator<ProfileDataCollection.Profile> getProfiles()
Get an iterator over the profiles stored in this collection. If there is a default profile in the collection it will be returned first by this iterator.
- Returns:
- an iterator over the profiles stored in this collection.
-
numProfiles
public int numProfiles()
Get the number of profiles stored in this collection.
- Returns:
- the number of profiles stored in this collection.
-
clearProfiles
public void clearProfiles()
Remove all the profiles stored in this collection. The profile table name and schema are retained.
-
-