Package net.sf.basedb.core.data
Class ItemListData
-
- All Implemented Interfaces:
AnnotatableData
,IdentifiableData
,LoggableData
,NameableData
,OwnableData
,RemovableData
,ShareableData
public class ItemListData extends AnnotatedData
This represents an arbitrary collection of items. While the underlying implementation would allow any kind of items to be stored in the list, considerations for GUI support limit the items to those that implement theListable
interface.- Since:
- 3.5
- Author:
- Nicklas
- See Also:
ItemList
- Hibernate: class
- table="`ItemLists`" lazy="false"
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
disableManualMembers
private boolean
disableSyncFilters
private String
externalId
static int
MAX_EXTERNAL_ID_LENGTH
The maximum length of the external ID that can be stored in the database.private String
md5AtLastSync
private Set<Integer>
members
private int
memberType
private String
rawDataType
private int
size
private int
sizeAtLastSync
private ItemSubtypeData
subtype
private Date
syncDate
private Set<ItemListSyncFilterData>
syncFilters
-
Fields inherited from interface net.sf.basedb.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
-
-
Constructor Summary
Constructors Constructor Description ItemListData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getDisableManualMembers()
If set, manually adding/removing members is disabledboolean
getDisableSyncFilters()
If set, syncing members with sync filter is disabledString
getExternalId()
Get the external id for thisItemList
item.ItemSubtypeData
getItemSubtype()
Get the subtype of items that can be members in this list.String
getMd5AtLastSync()
Get the MD5 hash of the concatenated ID values from the last sync.Set<Integer>
getMembers()
Get the set that manages which items that are part of this list.int
getMemberType()
Get the type of items this list can hold.String
getRawDataType()
Get the raw data type of raw bioassays that can be members in this list.int
getSize()
The number of biomaterials in the list.int
getSizeAtLastSync()
The size of the item list after the last sync, -1 if it has never been synced.Date
getSyncDate()
Get the date and time the list members was last synchronized by the filter context.Set<ItemListSyncFilterData>
getSyncFilters()
This is the inverse end.void
setDisableManualMembers(boolean disableManualMembers)
void
setDisableSyncFilters(boolean disableSyncFilters)
void
setExternalId(String externalId)
void
setItemSubtype(ItemSubtypeData subtype)
void
setMd5AtLastSync(String md5AtLastSync)
void
setMembers(Set<Integer> members)
void
setMemberType(int memberType)
void
setRawDataType(String rawDataType)
void
setSize(int size)
void
setSizeAtLastSync(int sizeAtLastSync)
void
setSyncDate(Date syncDate)
(package private) void
setSyncFilters(Set<ItemListSyncFilterData> syncFilters)
-
Methods inherited from class net.sf.basedb.core.data.AnnotatedData
getAnnotations, getAnnotationSet, setAnnotations, setAnnotationSet
-
Methods inherited from class net.sf.basedb.core.data.CommonData
getDescription, getName, getRemovedBy, setDescription, setName, setRemovedBy
-
Methods inherited from class net.sf.basedb.core.data.SharedData
getItemKey, getProjectKey, setItemKey, setProjectKey
-
Methods inherited from class net.sf.basedb.core.data.BasicData
equals, getId, getVersion, hashCode, setId, setVersion, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.basedb.core.data.IdentifiableData
getId, getVersion
-
Methods inherited from interface net.sf.basedb.core.data.OwnableData
getOwner, setOwner
-
-
-
-
Field Detail
-
MAX_EXTERNAL_ID_LENGTH
public static final int MAX_EXTERNAL_ID_LENGTH
The maximum length of the external ID that can be stored in the database.- See Also:
setExternalId(String)
, Constant Field Values
-
externalId
private String externalId
-
memberType
private int memberType
-
subtype
private ItemSubtypeData subtype
-
rawDataType
private String rawDataType
-
size
private int size
-
disableSyncFilters
private boolean disableSyncFilters
-
disableManualMembers
private boolean disableManualMembers
-
syncDate
private Date syncDate
-
sizeAtLastSync
private int sizeAtLastSync
-
md5AtLastSync
private String md5AtLastSync
-
syncFilters
private Set<ItemListSyncFilterData> syncFilters
-
-
Method Detail
-
getExternalId
public String getExternalId()
Get the external id for thisItemList
item.- Hibernate: property
- column="`external_id`" type="string" length="255" not-null="false"
-
setExternalId
public void setExternalId(String externalId)
-
getMemberType
public int getMemberType()
Get the type of items this list can hold. Not possible to change after creation.- Hibernate: property
- column="`member_type`" type="int" not-null="true" update="false"
-
setMemberType
public void setMemberType(int memberType)
-
getItemSubtype
public ItemSubtypeData getItemSubtype()
Get the subtype of items that can be members in this list. This is a recommendation only and is not enforced.- Hibernate: many-to-one
- column="`subtype_id`" not-null="false" outer-join="false"
-
setItemSubtype
public void setItemSubtype(ItemSubtypeData subtype)
-
getRawDataType
public String getRawDataType()
Get the raw data type of raw bioassays that can be members in this list. This is a recommendation only and is not enforced.- Hibernate: property
- column="`rawdatatype`" type="string" length="255" not-null="false"
-
setRawDataType
public void setRawDataType(String rawDataType)
-
getSize
public int getSize()
The number of biomaterials in the list.- Hibernate: property
- column="`size`" type="int" not-null="true"
-
setSize
public void setSize(int size)
-
getMembers
public Set<Integer> getMembers()
Get the set that manages which items that are part of this list.- Hibernate: set
- table="`ItemListMembers`" lazy="true"
- Hibernate: collection-key
- column="`list_id`"
- Hibernate: collection-element
- column="`item_id`" type="int"
-
getDisableSyncFilters
public boolean getDisableSyncFilters()
If set, syncing members with sync filter is disabled- Hibernate: property
- column="`disable_syncfilters`" type="boolean" not-null="true"
-
setDisableSyncFilters
public void setDisableSyncFilters(boolean disableSyncFilters)
-
getDisableManualMembers
public boolean getDisableManualMembers()
If set, manually adding/removing members is disabled- Hibernate: property
- column="`disable_manual`" type="boolean" not-null="true"
-
setDisableManualMembers
public void setDisableManualMembers(boolean disableManualMembers)
-
getSyncDate
public Date getSyncDate()
Get the date and time the list members was last synchronized by the filter context.- Hibernate: property
- column="`sync_date`" type="timestamp" not-null="false"
-
setSyncDate
public void setSyncDate(Date syncDate)
-
getSizeAtLastSync
public int getSizeAtLastSync()
The size of the item list after the last sync, -1 if it has never been synced.- Since:
- 3.18
- Hibernate: property
- column="`size_last_sync`" type="int" not-null="true"
-
setSizeAtLastSync
public void setSizeAtLastSync(int sizeAtLastSync)
-
getMd5AtLastSync
public String getMd5AtLastSync()
Get the MD5 hash of the concatenated ID values from the last sync. It is always returned as a string with 32 hexadecimal characters. This value can be compared to the MD5 of the current members to detect modifications.- Since:
- 3.18
- Hibernate: property
- column="`md5_last_sync`" type="string" length="32" not-null="false"
-
setMd5AtLastSync
public void setMd5AtLastSync(String md5AtLastSync)
-
getSyncFilters
public Set<ItemListSyncFilterData> getSyncFilters()
This is the inverse end.- See Also:
ItemListSyncFilterData.getItemList()
- Hibernate: set
- lazy="true" inverse="true" cascade="delete"
- Hibernate: collection-key
- column="`itemlist_id`"
- Hibernate: collection-one-to-many
- class="net.sf.basedb.core.data.ItemListSyncFilterData"
-
setSyncFilters
void setSyncFilters(Set<ItemListSyncFilterData> syncFilters)
-
-