Revision 28468 branches/v2_0_0_prep/libraries/libIverUtiles/src-test/com/iver/utiles/TestXMLEntityPersistenceManager.java
TestXMLEntityPersistenceManager.java | ||
---|---|---|
392 | 392 |
try { |
393 | 393 |
PersistentState state = ToolsLocator.getPersistenceManager().getState(originalList); |
394 | 394 |
MyPersistentList resultList = new MyPersistentList(); |
395 |
resultList.setState(state);
|
|
395 |
resultList.loadFromState(state);
|
|
396 | 396 |
checkEquals(originalList, resultList); |
397 | 397 |
|
398 | 398 |
} catch (LocatorException e) { |
... | ... | |
444 | 444 |
|
445 | 445 |
} |
446 | 446 |
|
447 |
public void setState(PersistentState state) throws PersistenceException {
|
|
447 |
public void loadFromState(PersistentState state) throws PersistenceException {
|
|
448 | 448 |
Iterator it = state.getIterator("myList"); |
449 | 449 |
list = new ArrayList(); |
450 | 450 |
while (it.hasNext()) { |
... | ... | |
483 | 483 |
value = val; |
484 | 484 |
} |
485 | 485 |
|
486 |
public void setState(PersistentState state) throws PersistenceException {
|
|
486 |
public void loadFromState(PersistentState state) throws PersistenceException {
|
|
487 | 487 |
value = state.getString("miValor"); |
488 | 488 |
intValue = state.getInt("numero"); |
489 | 489 |
} |
... | ... | |
528 | 528 |
value3 = val; |
529 | 529 |
} |
530 | 530 |
|
531 |
public void setState(PersistentState state) throws PersistenceException {
|
|
531 |
public void loadFromState(PersistentState state) throws PersistenceException {
|
|
532 | 532 |
value1 = state.get("miObjetito1"); |
533 | 533 |
value2 = state.get("miObjetito2"); |
534 | 534 |
value3 = state.get("miObjetito3"); |
Also available in: Unified diff