Package net.sf.basedb.core.data
Class ItemListSyncFilterData
java.lang.Object
net.sf.basedb.core.data.BasicData
net.sf.basedb.core.data.ItemListSyncFilterData
- All Implemented Interfaces:
IdentifiableData
,NameableData
public class ItemListSyncFilterData extends BasicData implements NameableData
Synchronization options for item lists. This is similar
to filters used by
ContextData
.- Since:
- 3.5
- Author:
- Nicklas
- Hibernate: class
- table="`ItemListSyncFilters`" lazy="true"
-
Field Summary
Fields Modifier and Type Field Description private String
description
private boolean
disabled
private String
filterGroup
private int
include
private ItemListData
itemList
private String
lastSyncProperties
private int
matchingSource
private int
matchingTransformed
private String
md5
private String
name
private Map<String,PropertyFilterData>
propertyFilters
private int
sourceItemTransform
private int
sourceItemType
private boolean
sourceMustExist
Fields inherited from interface net.sf.basedb.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
-
Constructor Summary
Constructors Constructor Description ItemListSyncFilterData()
-
Method Summary
Modifier and Type Method Description String
getDescription()
Get the description for the item.String
getFilterGroup()
Get the group for this filter.int
getInclude()
Flags for specifying include options to an entity query.ItemListData
getItemList()
Get the item list this sync filter belongs to.String
getLastSyncProperties()
A string representation of properties that was affecting that last filter during the last sync.int
getMatchingSource()
The number of matching source items during that last sync.int
getMatchingTransformed()
The number of matching items after the transform during that last sync.String
getMd5()
Get the MD5 hash of the concatenated ID values.String
getName()
Get the name of the item.Map<String,PropertyFilterData>
getPropertyFilters()
Get the map that manages property filters in this sync filter.int
getSourceItemTransform()
The transform to use for converting filter matches to list members. 0 = none; 1 = parent to child, 2 = child to parentint
getSourceItemType()
Get the type of items that this filter is applies to.boolean
getSourceMustExist()
If set, the source item must exist, otherwise it must not exist.boolean
isDisabled()
If set, the filter is disabled and should not be used when syncing.void
setDescription(String description)
Set the description for the item.void
setDisabled(boolean disabled)
void
setFilterGroup(String filterGroup)
void
setInclude(int include)
void
setItemList(ItemListData itemList)
void
setLastSyncProperties(String lastSyncProperties)
void
setMatchingSource(int matchingSource)
void
setMatchingTransformed(int matchingTransformed)
void
setMd5(String md5)
void
setName(String name)
Set the name of the item.(package private) void
setPropertyFilters(Map<String,PropertyFilterData> propertyFilters)
void
setSourceItemTransform(int sourceItemTransform)
void
setSourceItemType(int sourceItemType)
void
setSourceMustExist(boolean sourceMustExist)
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
-
Field Details
-
name
-
description
-
itemList
-
filterGroup
-
sourceItemType
private int sourceItemType -
sourceItemTransform
private int sourceItemTransform -
sourceMustExist
private boolean sourceMustExist -
disabled
private boolean disabled -
matchingSource
private int matchingSource -
matchingTransformed
private int matchingTransformed -
lastSyncProperties
-
md5
-
include
private int include -
propertyFilters
-
-
Constructor Details
-
ItemListSyncFilterData
public ItemListSyncFilterData()
-
-
Method Details
-
getName
Description copied from interface:NameableData
Get the name of the item.- Specified by:
getName
in interfaceNameableData
- Returns:
- A
String
with the name of the item
-
setName
Description copied from interface:NameableData
Set the name of the item. The name cannot be null and mustn't be longer than the value specified by theMAX_NAME_LENGTH
constant.- Specified by:
setName
in interfaceNameableData
- Parameters:
name
- The new name for the item
-
getDescription
Description copied from interface:NameableData
Get the description for the item.- Specified by:
getDescription
in interfaceNameableData
- Returns:
- A
String
with a description of the item
-
setDescription
Description copied from interface:NameableData
Set the description for the item. The description can be null but mustn't be longer than the value specified by theMAX_DESCRIPTION_LENGTH
constant.- Specified by:
setDescription
in interfaceNameableData
- Parameters:
description
- The new description for the item
-
getItemList
Get the item list this sync filter belongs to.- Hibernate: many-to-one
- column="`itemlist_id`" not-null="true" outer-join="false" update="false"
-
setItemList
-
getFilterGroup
Get the group for this filter.- Since:
- 3.18
- Hibernate: property
- column="`filter_group`" type="string" length="255" not-null="true"
-
setFilterGroup
-
getSourceItemType
public int getSourceItemType()Get the type of items that this filter is applies to.- Hibernate: property
- column="`source_type`" type="int" not-null="true"
-
setSourceItemType
public void setSourceItemType(int sourceItemType) -
getSourceItemTransform
public int getSourceItemTransform()The transform to use for converting filter matches to list members. 0 = none; 1 = parent to child, 2 = child to parent- Hibernate: property
- column="`source_transform`" type="int" not-null="true"
-
setSourceItemTransform
public void setSourceItemTransform(int sourceItemTransform) -
getSourceMustExist
public boolean getSourceMustExist()If set, the source item must exist, otherwise it must not exist. This option is only used if the transform is to a parent/child item- Hibernate: property
- column="`source_must_exist`" type="boolean" not-null="true"
-
setSourceMustExist
public void setSourceMustExist(boolean sourceMustExist) -
isDisabled
public boolean isDisabled()If set, the filter is disabled and should not be used when syncing.- Hibernate: property
- column="`disabled`" type="boolean" not-null="true"
-
setDisabled
public void setDisabled(boolean disabled) -
getMatchingSource
public int getMatchingSource()The number of matching source items during that last sync.- Hibernate: property
- column="`matching_source`" type="int" not-null="true"
-
setMatchingSource
public void setMatchingSource(int matchingSource) -
getMatchingTransformed
public int getMatchingTransformed()The number of matching items after the transform during that last sync.- Hibernate: property
- column="`matching_transformed`" type="int" not-null="true"
-
setMatchingTransformed
public void setMatchingTransformed(int matchingTransformed) -
getLastSyncProperties
A string representation of properties that was affecting that last filter during the last sync. Used to check if the result may affect the final item list even if the actual items returned by the query hasn't change. Example: changing the filterGroup or sourceMustExists options.- Since:
- 3.18
- Hibernate: property
- column="`last_sync_properties`" type="string" length="255" not-null="false"
-
setLastSyncProperties
-
getMd5
Get the MD5 hash of the concatenated ID values. It is always returned as a string with 32 hexadecimal characters.- Hibernate: property
- column="`md5`" type="string" length="32" not-null="false"
-
setMd5
-
getInclude
public int getInclude()Flags for specifying include options to an entity query.- Hibernate: property
- column="`include`" type="int" not-null="true"
-
setInclude
public void setInclude(int include) -
getPropertyFilters
Get the map that manages property filters in this sync filter.- Hibernate: map
- table="`ItemListSyncPropertyFilters`" lazy="true"
- Hibernate: collection-key
- column="`syncfilter_id`"
- Hibernate: collection-index
- column="`property`" type="string" length="255"
- Hibernate: collection-composite-element
- class="net.sf.basedb.core.data.PropertyFilterData" not-null="true"
-
setPropertyFilters
-