public final class ProfileDataCollection extends Object implements Serializable
A ProfileDataCollection
is a collection of exported profile data.
Modifier and Type | Class and 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.Profile
Class representing a profile.
|
Constructor and Description |
---|
ProfileDataCollection(String tableName,
ProfileDataCollection.Attribute[] attrs)
Create a new profile data collection to store exported profile table state.
|
Modifier and Type | Method and 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.
|
public ProfileDataCollection(String tableName, ProfileDataCollection.Attribute[] attrs)
Create a new profile data collection to store exported profile table state.
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.NullPointerException
- is either argument is null.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.
public ProfileDataCollection.Attribute[] getAttributes()
Get the profile attribute descriptions for the profile table. These attributes represent the (expected) schema of the profile table.
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.
replaceAll
- the new value of the flag.replaceAll
public boolean replaceAll()
Determine if the global "create means replace" flag has been set for this profile data collection.
setReplaceAll(boolean)
public void addProfile(ProfileDataCollection.Profile profile)
Add a profile to the collection.
profile
- the profile to add.NullPointerException
- if profile
is null
.public Iterator<ProfileDataCollection.Profile> getProfiles()
Get an iterator over the profiles stored in this collection.
public int numProfiles()
Get the number of profiles stored in this collection.
public void clearProfiles()
Remove all the profiles stored in this collection. The profile table name and schema are retained.