public class OneToManyHandler<T extends Item>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
foreignKeyAttr |
protected java.lang.String |
handlerMode |
| Constructor and Description |
|---|
OneToManyHandler(java.lang.String targetItemType,
boolean partOf,
java.lang.String foreignKeyAttr,
java.lang.String orderNumberAttr,
boolean reorderable,
boolean asc) |
OneToManyHandler(java.lang.String targetItemType,
boolean partOf,
java.lang.String foreignKeyAttr,
java.lang.String orderNumberAttr,
boolean reorderable,
boolean asc,
int typeOfCollection) |
OneToManyHandler(java.lang.String targetItemType,
boolean partOf,
java.lang.String foreignKeyAttr,
java.lang.String orderNumberAttr,
boolean reorderable,
boolean asc,
int typeOfCollection,
java.lang.String conditionQuery) |
| Modifier and Type | Method and Description |
|---|---|
void |
addValue(SessionContext ctx,
Item key,
T toLink) |
java.lang.String |
getConditionQuery() |
java.lang.String |
getForeignKeyAttr() |
int |
getNextOrderNumber(SessionContext ctx,
Item key) |
java.lang.String |
getOrderNumberAttr() |
java.util.Collection<T> |
getValues(SessionContext ctx,
Item key) |
boolean |
isPartOf() |
boolean |
isReOrderable() |
void |
newInstance(SessionContext ctx,
Item.ItemAttributeMap attributes) |
void |
notifyKeyRemoval(SessionContext ctx,
Item key) |
void |
removeValue(SessionContext ctx,
Item key,
T linked) |
SearchResult |
searchForLinkedItems(PK pk) |
protected void |
setForeignKeyValue(SessionContext ctx,
Item key,
T toLink)
sets a foreign key property
foreignKeyAttr for source item T |
protected void |
setPosAttributeValue(SessionContext ctx,
T toLink,
int index)
sets a _pos attribute (
orderNumberAttr) related for foreignKeyAttr for source item T |
void |
setValues(SessionContext ctx,
Item key,
java.util.Collection<T> values) |
protected boolean |
setValuesInternal(SessionContext ctx,
Item key,
java.util.Collection<T> values) |
protected boolean |
useLegacyMode()
If returns true.
|
protected final java.lang.String handlerMode
protected final java.lang.String foreignKeyAttr
public OneToManyHandler(java.lang.String targetItemType,
boolean partOf,
java.lang.String foreignKeyAttr,
java.lang.String orderNumberAttr,
boolean reorderable,
boolean asc)
public OneToManyHandler(java.lang.String targetItemType,
boolean partOf,
java.lang.String foreignKeyAttr,
java.lang.String orderNumberAttr,
boolean reorderable,
boolean asc,
int typeOfCollection)
public OneToManyHandler(java.lang.String targetItemType,
boolean partOf,
java.lang.String foreignKeyAttr,
java.lang.String orderNumberAttr,
boolean reorderable,
boolean asc,
int typeOfCollection,
java.lang.String conditionQuery)
protected boolean useLegacyMode()
setForeignKeyValue(SessionContext, Item, Item) is called,
otherwise a positioning logic is used while setting reference, this affects relative position in ordered
collections.public SearchResult searchForLinkedItems(PK pk)
public java.util.Collection<T> getValues(SessionContext ctx, Item key)
public int getNextOrderNumber(SessionContext ctx, Item key)
protected boolean setValuesInternal(SessionContext ctx, Item key, java.util.Collection<T> values)
public void setValues(SessionContext ctx, Item key, java.util.Collection<T> values)
public void addValue(SessionContext ctx, Item key, T toLink)
public void newInstance(SessionContext ctx, Item.ItemAttributeMap attributes)
protected void setForeignKeyValue(SessionContext ctx, Item key, T toLink) throws JaloSecurityException, JaloBusinessException
foreignKeyAttr for source item Tprotected void setPosAttributeValue(SessionContext ctx, T toLink, int index) throws JaloSecurityException, JaloBusinessException
orderNumberAttr) related for foreignKeyAttr for source item Tpublic void removeValue(SessionContext ctx, Item key, T linked)
public void notifyKeyRemoval(SessionContext ctx, Item key)
public java.lang.String getForeignKeyAttr()
public java.lang.String getOrderNumberAttr()
public boolean isReOrderable()
public boolean isPartOf()
public java.lang.String getConditionQuery()
Copyright © 2018 SAP SE. All Rights Reserved.