public MithraObject createObject(MithraDataObject newData) { Person newObject = new Person(); newObject.zSetFromPersonData((PersonData) newData); return newObject; }
@Override public String toString() { return "Person(" + "personId=" + this.getPersonId() + ", firstName='" + this.getFirstName() + '\'' + ", lastName='" + this.getLastName() + '\'' + ", pets=" + this.getPets() + ')'; } }
@Override public String toString() { return "Person[name=" + this.getName() + "; country=" + this.getCountry() + "; age=" + this.getAge() + ']'; } }
private void initPortal(Cache cache, MithraConfigurationManager.Config config) { if (config.isThreeTierClient()) { PersonFinder.initializeClientPortal(this, cache, config); } else { PersonFinder.initializePortal(this, cache, config); } if (config.isParticipatingInTx()) { Person.zConfigFullTx(); } else { Person.zConfigNonTx(); } }
public void setOwner(Person owner) { Person _owner = (Person) owner; DatedTransactionalBehavior _behavior = zGetTransactionalBehaviorForWrite(); PetData _data = (PetData) _behavior.getCurrentDataForWrite(this); if (_behavior.isInMemory()) { Object _prev = _data.getOwner(); if (_behavior.isDetached() && _prev != null) { ((DelegatingList)((Person)_prev).getPets()).zMarkMoved( (Pet) this); } _data.setOwner(_owner); _owner.getPets().add((Pet) this); } else if (_behavior.isPersisted()) { if (_owner == null) { this.setPersonId(0); } else { this.setPersonId( _owner.getPersonId()); } } else throw new RuntimeException("not implemented"); }
public Operation eq(Person other) { return this.personId().eq(other.getPersonId()) ; } // this implementation uses private API. Do NOT copy to application code. Application code must use normal operations for lookups.
if(_result != null) _result = _result.getDetachedCopy();
private void initPortal(Cache cache, MithraConfigurationManager.Config config) { if (config.isThreeTierClient()) { PersonFinder.initializeClientPortal(this, cache, config); } else { PersonFinder.initializePortal(this, cache, config); } if (config.isParticipatingInTx()) { Person.zConfigFullTx(); } else { Person.zConfigNonTx(); } }
public Operation eq(Person other) { return this.personId().eq(other.getPersonId()) ; } // this implementation uses private API. Do NOT copy to application code. Application code must use normal operations for lookups.
public MithraObject createObject(MithraDataObject newData) { Person newObject = new Person(); newObject.zSetFromPersonData((PersonData) newData); return newObject; }