|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.malai.mapping.List2ObjectMapping<E,java.util.List<F>>
org.malai.mapping.List2ListMapping<E,F>
org.malai.mapping.SymmetricList2ListMapping<E,F>
E
- The type of the source list of the mapping.F
- The type of the target list of the mapping.public abstract class SymmetricList2ListMapping<E,F>
This interface defines the concept of mapping that link source objects with target objects.
This file is part of Malai.
Copyright (c) 2009-2012 Arnaud BLOUIN
Malai is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
Malai is distributed without any warranty; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
05/15/2010
Field Summary |
---|
Fields inherited from class org.malai.mapping.List2ObjectMapping |
---|
source, target |
Constructor Summary | |
---|---|
SymmetricList2ListMapping(java.util.List<E> source,
java.util.List<F> target)
List2ListMapping.List2ListMapping(List, List) |
Method Summary | |
---|---|
protected abstract F |
createTargetObject(java.lang.Object sourceObject)
Creates an instance of the target type using the given source object. |
void |
init()
At start, the mapping must be executed one time to initialise the binding between source and target objects. |
void |
onListCleaned(java.lang.Object list)
Executes the mapping when all the elements of the source were removed. |
void |
onObjectAdded(java.lang.Object list,
java.lang.Object object,
int index)
Executes the mapping for the addition of an object. |
void |
onObjectModified(java.lang.Object object)
Executes the mapping for the modification of an object. |
void |
onObjectMoved(java.lang.Object list,
java.lang.Object object,
int srcIndex,
int targetIndex)
Executes the mapping for the move of an object. |
void |
onObjectRemoved(java.lang.Object list,
java.lang.Object object,
int index)
Executes the mapping for the deletion of an object. |
void |
onObjectReplaced(IUnary<?> object,
java.lang.Object replcaedObject)
Executes the mapping when an object has been replaced by an other one. |
Methods inherited from class org.malai.mapping.List2ObjectMapping |
---|
clear, getSource, getTarget |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SymmetricList2ListMapping(java.util.List<E> source, java.util.List<F> target)
List2ListMapping.List2ListMapping(List, List)
Method Detail |
---|
protected abstract F createTargetObject(java.lang.Object sourceObject)
sourceObject
- The source object used to create the target object.
public void onObjectAdded(java.lang.Object list, java.lang.Object object, int index)
IMapping
list
- The modified source list.object
- The added object.index
- The position where the object has been added. -1 = the last position.public void onObjectModified(java.lang.Object object)
IMapping
object
- The modified object.public void onObjectMoved(java.lang.Object list, java.lang.Object object, int srcIndex, int targetIndex)
IMapping
list
- The modified source list.object
- The move object.srcIndex
- The source position of the object. -1 = the last position.targetIndex
- The target position of the object. -1 = the last position.public void onObjectRemoved(java.lang.Object list, java.lang.Object object, int index)
IMapping
list
- The modified source list.object
- The deleted object.index
- The position where the object has been deleted. -1 = the last position.public void onListCleaned(java.lang.Object list)
IMapping
list
- The list before the cleaning, i.e. it still contains all the elements in
order to know which elements have been removed.public void init()
IMapping
public void onObjectReplaced(IUnary<?> object, java.lang.Object replcaedObject)
IMapping
object
- The singleton that contains the new object.replcaedObject
- The old object contained in the singleton that has been replaced.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |