Skip to content

Instantly share code, notes, and snippets.

@aino-gautam
Last active March 25, 2018 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aino-gautam/9c3336b9083ac75bf760637f3e5c5a28 to your computer and use it in GitHub Desktop.
Save aino-gautam/9c3336b9083ac75bf760637f3e5c5a28 to your computer and use it in GitHub Desktop.
Generated PojoMarker optimization
package com.trupublic.shared.slim.tapp;
import org.appops.altshared.shared.PojoMarker;
import org.appops.jsonizer.client.base.ObjectPeer;
import org.appops.jsonizer.client.PojoMarkerHelper;
import com.trupublic.shared.slim.tapp.TappSlim;
import org.appops.jsonizer.client.base.Jsonizer;
import org.appops.jsonizer.client.impls.BasePojoMarkerImpl;
import com.google.gwt.core.client.JavaScriptObject;
import org.appops.altshared.shared.altcore.altentity.Primitive;
import org.appops.jsonizer.client.impls.PojoMarkerImplInstantiatorRegistry;
import org.appops.jsonizer.client.base.PojoMarkerImplInstantiator;
import com.google.gwt.core.client.GWT;
import java.io.Serializable;
import org.appops.altshared.shared.InstanceProvider;
import org.appops.altshared.shared.jsonizer.base.StaticsRegistry;
import java.util.HashMap;
import org.appops.altshared.shared.altcore.altentity.AltId;
import org.appops.altshared.shared.altcore.altentity.type.AltType;
import org.appops.jsonizer.client.base.Utils;
import org.appops.altshared.shared.jsonizer.base.InstanceRegistry;
import org.appops.jsonizer.client.impls.JsonizerParser;
import org.appops.altshared.shared.jsonizer.base.Constants;
import org.appops.altshared.shared.altcore.annotations.Worker;
import org.appops.jsonizer.client.base.TypeKeyFactory;
import org.appops.altshared.shared.jsonizer.base.TypeKey;
import org.appops.altshared.shared.jsonizer.base.TypedAs;
import org.appops.altshared.shared.jsonizer.base.CollectionTypeKey;
import java.util.*;
import org.appops.altshared.shared.jsonizer.base.ObjectJsonizer;
import org.appops.sync.client.eventconfiguration.event.ApplyPojoMarkerChangeEvent;
import com.google.gwt.event.shared.SimpleEventBus;
import org.appops.altshared.shared.sync.IntrinsicChange;
import org.appops.altshared.shared.sync.SyncChange;
import org.appops.sync.client.eventconfiguration.event.PojoMarkerModifiedEvent;
import java.util.logging.Logger;
import java.util.logging.Level;
import org.appops.sync.client.eventconfiguration.event.ApplyCollectionChangeEvent;
import org.appops.jsonizer.client.base.ManagePojo;
import org.appops.jsonizer.client.customcollection.JsonArrayList;
import org.appops.sync.client.eventconfiguration.event.ApplyArrayListAddElementChangeEvent;
import org.appops.sync.client.eventconfiguration.event.ApplyHashMapChangeEvent;
import com.google.gwt.json.client.JSONObject;
import org.appops.altshared.shared.altcore.annotations.NoDeepCopy;
import org.appops.jsonizer.client.base.DeepCopy;
import org.appops.sync.client.eventconfiguration.event.ApplyArrayListRemoveChangeEvent;
import org.appops.sync.client.eventconfiguration.event.ApplyArrayListClearChangeEvent;
import org.appops.sync.client.eventconfiguration.event.ApplyLinkedListAddElementChangeEvent;
import org.appops.jsonizer.client.customcollection.JsonLinkedList;
import org.appops.altshared.shared.sync.HashMapRemoveElementChange;
import java.lang.annotation.Annotation;
import org.appops.jsonizer.client.base.TypeInfo;
import org.appops.altshared.shared.sync.PojoMarkerChange;
import org.appops.jsonizer.client.async.ClientService;
import org.appops.altshared.shared.sync.SyncInternal;
import org.appops.altshared.shared.altcore.altentity.AltEntity;
import org.appops.altshared.shared.altcore.altentity.AltLongId;
import org.appops.jsonizer.client.binding.JsonizerGinjector;
import org.appops.altshared.shared.sync.ArrayListChange;
import org.appops.altshared.shared.sync.LinkedListChange;
import org.appops.jsonizer.client.customcollection.JsonHashMap;
import org.appops.altshared.shared.sync.HashMapChange;
import org.appops.altshared.shared.sync.HashMapClearChange;
import org.appops.altshared.shared.sync.HashMapAddElementChange;
import org.appops.jsonizer.client.customcollection.JsonTreeMap;
import org.appops.altshared.shared.sync.TreeMapChange;
import org.appops.jsonizer.client.customcollection.JsonHashSet;
import org.appops.altshared.shared.sync.TreeMapClearChange;
import org.appops.altshared.shared.sync.TreeMapAddElementChange;
import org.appops.altshared.shared.sync.TreeMapRemoveElementChange;
import org.appops.sync.client.eventconfiguration.event.ApplyTreeMapChangeEvent;
import org.appops.sync.client.eventconfiguration.event.ApplyHashSetChangeEvent;
import org.appops.altshared.shared.sync.HashSetRemoveElementChange;
import org.appops.altshared.shared.sync.HashSetAddElementChange;
import org.appops.altshared.shared.sync.HashSetClearChange;
import org.appops.altshared.shared.sync.HashSetChange;
import org.appops.altshared.shared.jsonizer.base.CustomSourceTypeKey;
import org.appops.altshared.shared.jsonizer.base.ProviderTypeKey;
import org.appops.altshared.shared.jsonizer.base.ClientInstanceRegistry;
import org.appops.altshared.shared.jsonizer.base.JsonCollection;
import org.appops.altshared.shared.jsonizer.base.TransientInstanceRegistry;
import org.appops.altshared.shared.jsonizer.base.AltJsonizerException;
import org.appops.jsonizer.client.impls.JSBasePojoMarkerImpl;
import org.appops.altshared.shared.annotation.JsonTopMost;
import org.appops.jsonizer.client.base.ManageCopy;
import org.appops.jsonizer.client.base.Selector;
import org.appops.jsonizer.client.base.ClassInfo;
import org.appops.jsonizer.client.base.SelectorId;
import com.google.common.base.Preconditions;
import org.appops.sync.client.eventconfiguration.event.CascadeDeleteEvent;
import org.appops.altshared.client.binding.AppOpsCommonGinjector;
import java.util.Date;
import java.lang.Boolean;
import com.trupublic.shared.store.TappVariableStore;
import java.lang.Class;
import java.lang.String;
import java.util.ArrayList;
public class GeneratedTappSlimPojoMarkerImpl extends com.trupublic.shared.slim.tapp.TappSlim implements org.appops.jsonizer.client.base.Jsonizer, java.io.Serializable, org.appops.jsonizer.client.base.JsonizerTypeInfo, org.appops.jsonizer.client.base.ManagePojo, org.appops.jsonizer.client.base.ObjectPeer, org.appops.altshared.shared.jsonizer.base.ObjectJsonizer, org.appops.altshared.shared.sync.SyncInternal, org.appops.sync.client.eventconfiguration.handlers.ApplyPojoMarkerChangeEventHandler, org.appops.sync.client.eventconfiguration.handlers.ApplyCollectonModifiedEventHandler, org.appops.jsonizer.client.PojoMarkerHelper, org.appops.jsonizer.client.base.DeepCopy, org.appops.jsonizer.client.base.ManageCopy, org.appops.jsonizer.client.base.Selector, org.appops.sync.client.eventconfiguration.handlers.CascadeDeleteEventHandler, org.appops.altshared.shared.jsonizer.base.HasReferrer {
/**
Since all the variables defined here are common for each generated class we need to move these variables and all such
common implementations into a single helper class.
Why can't we move these variables into BasePojoMarkerImpl ??
rename BasePojoMarkerImpl to PojoMarkerImplHelper
gHelper = new PojoMarkerImplHelper( "com.trupublic.shared.slim.tapp.TappSlim" ) ;
since overloaded constructor is not usable due to deferred binding, use a setter to pass all data into the helper including pojoMarkerkey
**/
/**
use a shorter version of pojoMarkerKey . Options are to use serialVersionUid or a generated pojoMarkerKery per class
**/
private BasePojoMarkerImpl _impl = JsonizerGinjector.INSTANCE.getBasePojoMarkerImpl();
private String pojoMarkerKey = "com.trupublic.shared.slim.tapp.TappSlim";
private static HashMap<String ,TypeKey> typeMap = new HashMap<String,TypeKey>();
private InstanceRegistry instanceRegistry = null;
private SimpleEventBus eventBus = null;
private Serializable instanceId = null;
private HashMap<String,TypeInfo> typeInfoMap = null;
private Logger logger = Logger.getLogger(this.getClass().getName());
private boolean isSynced = false;
private String guid = null;
private HashMap<Object, Object> deepCopyMap = null;
public GeneratedTappSlimPojoMarkerImpl(){
_impl.setTypeMap(typeMap);
_impl.setPojoMarkerImpl(this);
_impl.setPojomarkerKey(pojoMarkerKey);
this.setInstanceProvider();
/**
method generateTypeInfoMap() below is useless since the type info is generated through static codeblock.. Remove
this method implementation and invocation
**/
generateTypeInfoMap();
if(this.instanceRegistry == null){ // This check is not needed since its the construtor
/**
This is done since this is the topmost class .. for non topmost classes this instantiation shouldn't be done. Please confirm.
club the two method calls below into one.
**/
this.instanceRegistry = GWT.create(ClientInstanceRegistry.class);
_impl.setInstanceRegistry(this.instanceRegistry);
}
_impl.registerTopMostObject((PojoMarker)this);
}
/**
Arrange to remove the following static block by directly generating the static json equivalent of typemap during generation process
**/
static{
typeMap.put("familyid", TypeKeyFactory.getTypeKey("long"));
typeMap.put("isaddon", TypeKeyFactory.getTypeKey("boolean"));
typeMap.put("actionablelist",new CollectionTypeKey(TypedAs.FIXED, "java.util.ArrayList",new ArrayList<TypeKey>(Arrays.asList(new TypeKey(TypedAs.VARIANT,"org.appops.altshared.shared.altcore.action.Actionable")))));
typeMap.put("moduleslimlist",new CollectionTypeKey(TypedAs.FIXED, "java.util.ArrayList",new ArrayList<TypeKey>(Arrays.asList(new TypeKey(TypedAs.FIXED,"com.trupublic.shared.slim.tapp.module.ModuleSlim")))));
typeMap.put("tappdescription", TypeKeyFactory.getTypeKey("java.lang.String"));
typeMap.put("tappstatus", TypeKeyFactory.getTypeKey("java.lang.String"));
typeMap.put("blobid", TypeKeyFactory.getTypeKey("long"));
typeMap.put("translatedjsonblob", TypeKeyFactory.getTypeKey("long"));
typeMap.put("sceneslimlist",new CollectionTypeKey(TypedAs.FIXED, "java.util.ArrayList",new ArrayList<TypeKey>(Arrays.asList(new TypeKey(TypedAs.VARIANT,"com.trupublic.shared.slim.tapp.scene.SceneBase")))));
typeMap.put("createdby", TypeKeyFactory.getTypeKey("long"));
typeMap.put("spaceslimid", TypeKeyFactory.getTypeKey("long"));
typeMap.put("issystem", TypeKeyFactory.getTypeKey("boolean"));
typeMap.put("timemodified", TypeKeyFactory.getTypeKey("long"));
typeMap.put("istranslated", TypeKeyFactory.getTypeKey("boolean"));
typeMap.put("serviceid", TypeKeyFactory.getTypeKey("long"));
typeMap.put("isprimary", TypeKeyFactory.getTypeKey("boolean"));
typeMap.put("spaceslim", TypeKeyFactory.getTypeKey("long"));
typeMap.put("isprivate", TypeKeyFactory.getTypeKey("boolean"));
typeMap.put("homespaceid", TypeKeyFactory.getTypeKey("long"));
typeMap.put("rolelist",new CollectionTypeKey(TypedAs.FIXED, "java.util.ArrayList",new ArrayList<TypeKey>(Arrays.asList(new TypeKey(TypedAs.FIXED,"com.trupublic.shared.slim.tapp.role.RoleSlim")))));
typeMap.put("modifiedon", TypeKeyFactory.getTypeKey("java.util.Date"));
typeMap.put("iscommunity", TypeKeyFactory.getTypeKey("boolean"));
typeMap.put("isgeneric", TypeKeyFactory.getTypeKey("boolean"));
typeMap.put("spacetypeid", TypeKeyFactory.getTypeKey("long"));
typeMap.put("tappbanner", TypeKeyFactory.getTypeKey("long"));
typeMap.put("isdirty", new TypeKey(TypedAs.FIXED,"java.lang.Boolean"));
typeMap.put("tappvariablestore", new TypeKey(TypedAs.FIXED,"com.trupublic.shared.store.TappVariableStore"));
typeMap.put("thinglist",new CollectionTypeKey(TypedAs.FIXED, "java.util.ArrayList",new ArrayList<TypeKey>(Arrays.asList(new TypeKey(TypedAs.FIXED,"com.trupublic.shared.slim.tapp.thing.ThingSlim")))));
typeMap.put("timetranslated", TypeKeyFactory.getTypeKey("long"));
typeMap.put("iskernel", TypeKeyFactory.getTypeKey("boolean"));
typeMap.put("tappicon", TypeKeyFactory.getTypeKey("long"));
typeMap.put("owner", TypeKeyFactory.getTypeKey("long"));
typeMap.put("ishome", TypeKeyFactory.getTypeKey("boolean"));
typeMap.put("name", TypeKeyFactory.getTypeKey("java.lang.String"));
typeMap.put("modifiedby", TypeKeyFactory.getTypeKey("long"));
typeMap.put("versionid", TypeKeyFactory.getTypeKey("int"));
typeMap.put("createdon", TypeKeyFactory.getTypeKey("java.util.Date"));
typeMap.put("id", TypeKeyFactory.getTypeKey("long"));
/** remove pojoMarkerKey and replace with a statically defined typeKey which should be eventually annonymized and shortened by using an
alias */
String pojoMarkerKey = "";
pojoMarkerKey = "com.trupublic.shared.slim.tapp.TappSlim";
PojoMarkerImplInstantiatorRegistry.get().registerInstantiator( pojoMarkerKey , new PojoMarkerImplInstantiator<TappSlim>() {
@Override
public TappSlim createInstance() {
return GWT.create(TappSlim.class) ;
}
});
}
/**
make sure the instance provider is a singleton and is accessible through injection and if needed to provide to base class directly
do it from constructor
*/
@Worker
public void setInstanceProvider() {
super.setInstanceProvider((InstanceProvider)GWT.create(InstanceProvider.class));
}
/**
this method implementation should be removed and the related dependencies reworked. Further discussion needed.
It tries to retrieve all values of each property from the impl and set it to the corresponding class members by invoking
its setters
As we found the answer to this method is keep default values defined in class directly in the typemap and do a special implementation for
getProperty that will check -> if the variable is not defined in the peer, it confirms through typemap if there is a default value
*/
public void setAllPropertyValuesToClass() {
Object propertyValue = null;
propertyValue = _impl.getProperty("tappdescription");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setTappDescription((java.lang.String)propertyValue);
propertyValue = _impl.getProperty("isaddon");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setIsAddOn((boolean)propertyValue);
propertyValue = _impl.getProperty("spaceslimid");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setSpaceSlimId((long)propertyValue);
propertyValue = _impl.getProperty("issystem");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setIsSystem((boolean)propertyValue);
propertyValue = _impl.getProperty("familyid");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setFamilyId((long)propertyValue);
propertyValue = _impl.getProperty("ishome");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setIsHome((boolean)propertyValue);
propertyValue = _impl.getProperty("spacetypeid");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setSpaceTypeId((long)propertyValue);
propertyValue = _impl.getProperty("iskernel");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setIsKernel((boolean)propertyValue);
propertyValue = _impl.getProperty("isgeneric");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setIsGeneric((boolean)propertyValue);
propertyValue = _impl.getProperty("isdirty");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setIsDirty((boolean)propertyValue);
propertyValue = _impl.getProperty("istranslated");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setIsTranslated((boolean)propertyValue);
propertyValue = _impl.getProperty("tappvariablestore");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setTappVariableStore((com.trupublic.shared.store.TappVariableStore)propertyValue);
propertyValue = _impl.getProperty("owner");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setOwner((long)propertyValue);
propertyValue = _impl.getProperty("homespaceid");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setHomeSpaceId((long)propertyValue);
propertyValue = _impl.getProperty("actionablelist");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setActionableList((java.util.ArrayList)propertyValue);
propertyValue = _impl.getProperty("name");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setName((java.lang.String)propertyValue);
propertyValue = _impl.getProperty("iscommunity");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setIsCommunity((boolean)propertyValue);
propertyValue = _impl.getProperty("timetranslated");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setTimeTranslated((long)propertyValue);
propertyValue = _impl.getProperty("translatedjsonblob");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setTranslatedJsonBlob((long)propertyValue);
propertyValue = _impl.getProperty("rolelist");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setRoleList((java.util.ArrayList)propertyValue);
propertyValue = _impl.getProperty("modifiedby");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setModifiedBy((long)propertyValue);
propertyValue = _impl.getProperty("serviceid");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setServiceId((long)propertyValue);
propertyValue = _impl.getProperty("createdby");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setCreatedBy((long)propertyValue);
propertyValue = _impl.getProperty("moduleslimlist");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setModuleSlimList((java.util.ArrayList)propertyValue);
propertyValue = _impl.getProperty("sceneslimlist");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setSceneSlimList((java.util.ArrayList)propertyValue);
propertyValue = _impl.getProperty("tappbanner");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setTappBanner((long)propertyValue);
propertyValue = _impl.getProperty("createdon");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setCreatedOn((java.util.Date)propertyValue);
propertyValue = _impl.getProperty("id");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setId((long)propertyValue);
propertyValue = _impl.getProperty("isprimary");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setIsPrimary((boolean)propertyValue);
propertyValue = _impl.getProperty("thinglist");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setThingList((java.util.ArrayList)propertyValue);
propertyValue = _impl.getProperty("timemodified");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setTimeModified((long)propertyValue);
propertyValue = _impl.getProperty("modifiedon");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setModifiedOn((java.util.Date)propertyValue);
propertyValue = _impl.getProperty("spaceslim");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setSpaceSlim((long)propertyValue);
propertyValue = _impl.getProperty("tappicon");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setTappIcon((long)propertyValue);
propertyValue = _impl.getProperty("tappstatus");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setTappStatus((java.lang.String)propertyValue);
propertyValue = _impl.getProperty("versionid");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setVersionId((int)propertyValue);
propertyValue = _impl.getProperty("isprivate");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setIsPrivate((boolean)propertyValue);
propertyValue = _impl.getProperty("blobid");
if(propertyValue instanceof AltEntity){
propertyValue = getEntityConverted((AltEntity)propertyValue);
}
if(propertyValue != null && propertyValue instanceof Serializable)
super.setBlobId((long)propertyValue);
}
@Override
public long getFamilyId() {
Serializable value = _impl.getProperty("familyid");
if(!Utils.isNullOrEmptyValue(value)){
/** ensure value from peer is not null */
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
/** this particular if condition needs to be revisited. There are scnearios where the value eventbus won't be null
and instead we should check if the eventbus is equal to current object or not **/
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getFamilyId();
return (long)result;
}
}
/**
example of alternative getFamilyId
*/
private Serializable getPropertyInternal(String propName, Serializable superValue){
Serializable value = _impl.getProperty(propName);
if(!Utils.isNullOrEmptyValue(value)){
/** ensure value from peer is not null */
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
/** this particular if condition needs to be revisited. There are scnearios where the value eventbus won't be null
and instead we should check if the eventbus is equal to current object or not **/
((ManagePojo)value).setEventBus(this.getEventBus());
return value;
}else{
return superValue;
}
}
}
@Override
public long getAltFamilyId() {
return (long) getPropertyInternal("familyid" , super.getFamilyId());
}
@Override
public void setTappDescription(java.lang.String tappDescription) {
setPropertyValue("tappdescription",tappDescription);
}
@Override
public boolean getIsAddOn() {
Serializable value = _impl.getProperty("isaddon");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (boolean) value;
}else{
Object result = super.getIsAddOn();
return (boolean)result;
}
}
@Override
public java.util.ArrayList getActionableList() {
Serializable value = _impl.getProperty("actionablelist");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
((ManagePojo)value).setRegistrationKey(((ManagePojo)value).getRegistrationKey());
((ManagePojo)value).setPropertyValue("actionablelist",null);
return (java.util.ArrayList) value;
}else{
Object result = super.getActionableList();
if(result == null && value!=null){
result = value;
}
return (java.util.ArrayList)result;
}
}
@Override
public void setIsAddOn(boolean isAddOn) {
setPropertyValue("isaddon",isAddOn);
}
@Override
public void setSpaceSlimId(long spaceSlimId) {
setPropertyValue("spaceslimid",spaceSlimId);
}
@Override
public void setIsSystem(boolean isSystem) {
setPropertyValue("issystem",isSystem);
}
@Override
public java.util.ArrayList getModuleSlimList() {
Serializable value = _impl.getProperty("moduleslimlist");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
((ManagePojo)value).setRegistrationKey(((ManagePojo)value).getRegistrationKey());
((ManagePojo)value).setPropertyValue("moduleslimlist",null);
return (java.util.ArrayList) value;
}else{
Object result = super.getModuleSlimList();
if(result == null && value!=null){
result = value;
}
return (java.util.ArrayList)result;
}
}
@Override
public void setFamilyId(long familyId) {
setPropertyValue("familyid",familyId);
}
@Override
public void setIsHome(boolean isHome) {
setPropertyValue("ishome",isHome);
}
@Override
public java.lang.String getTappDescription() {
Serializable value = _impl.getProperty("tappdescription");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (java.lang.String) value;
}else{
Object result = super.getTappDescription();
return (java.lang.String)result;
}
}
@Override
public void setSpaceTypeId(long spaceTypeId) {
setPropertyValue("spacetypeid",spaceTypeId);
}
@Override
public void setIsKernel(boolean isKernel) {
setPropertyValue("iskernel",isKernel);
}
@Override
public void setIsGeneric(boolean isGeneric) {
setPropertyValue("isgeneric",isGeneric);
}
@Override
public void setIsDirty(boolean isDirty) {
setPropertyValue("isdirty",isDirty);
}
@Override
public void setIsTranslated(boolean isTranslated) {
setPropertyValue("istranslated",isTranslated);
}
@Override
public java.lang.String getTappStatus() {
Serializable value = _impl.getProperty("tappstatus");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (java.lang.String) value;
}else{
Object result = super.getTappStatus();
return (java.lang.String)result;
}
}
@Override
public void setTappVariableStore(com.trupublic.shared.store.TappVariableStore tappVariableStore) {
setPropertyValue("tappvariablestore",tappVariableStore);
}
@Override
public long getBlobId() {
Serializable value = _impl.getProperty("blobid");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getBlobId();
return (long)result;
}
}
@Override
public long getTranslatedJsonBlob() {
Serializable value = _impl.getProperty("translatedjsonblob");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getTranslatedJsonBlob();
return (long)result;
}
}
@Override
public java.util.ArrayList getSceneSlimList() {
Serializable value = _impl.getProperty("sceneslimlist");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
((ManagePojo)value).setRegistrationKey(((ManagePojo)value).getRegistrationKey());
((ManagePojo)value).setPropertyValue("sceneslimlist",null);
return (java.util.ArrayList) value;
}else{
Object result = super.getSceneSlimList();
if(result == null && value!=null){
result = value;
}
return (java.util.ArrayList)result;
}
}
@Override
public void setOwner(long owner) {
setPropertyValue("owner",owner);
}
@Override
public long getCreatedBy() {
Serializable value = _impl.getProperty("createdby");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getCreatedBy();
return (long)result;
}
}
@Override
public long getSpaceSlimId() {
Serializable value = _impl.getProperty("spaceslimid");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getSpaceSlimId();
return (long)result;
}
}
@Override
public boolean getIsSystem() {
Serializable value = _impl.getProperty("issystem");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (boolean) value;
}else{
Object result = super.getIsSystem();
return (boolean)result;
}
}
@Override
public long getTimeModified() {
Serializable value = _impl.getProperty("timemodified");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getTimeModified();
return (long)result;
}
}
@Override
public void setHomeSpaceId(long homeSpaceId) {
setPropertyValue("homespaceid",homeSpaceId);
}
@Override
public boolean getIsTranslated() {
Serializable value = _impl.getProperty("istranslated");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (boolean) value;
}else{
Object result = super.getIsTranslated();
return (boolean)result;
}
}
@Override
public long getServiceId() {
Serializable value = _impl.getProperty("serviceid");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getServiceId();
return (long)result;
}
}
@Override
public boolean getIsPrimary() {
Serializable value = _impl.getProperty("isprimary");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (boolean) value;
}else{
Object result = super.getIsPrimary();
return (boolean)result;
}
}
@Override
public void setActionableList(java.util.ArrayList actionableList) {
setPropertyValue("actionablelist",actionableList);
}
@Override
public void setName(java.lang.String name) {
setPropertyValue("name",name);
}
@Override
public long getSpaceSlim() {
Serializable value = _impl.getProperty("spaceslim");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getSpaceSlim();
return (long)result;
}
}
@Override
public void setIsCommunity(boolean isCommunity) {
setPropertyValue("iscommunity",isCommunity);
}
@Override
public void setTimeTranslated(long timeTranslated) {
setPropertyValue("timetranslated",timeTranslated);
}
@Override
public void setTranslatedJsonBlob(long translatedJsonBlob) {
setPropertyValue("translatedjsonblob",translatedJsonBlob);
}
@Override
public boolean getIsPrivate() {
Serializable value = _impl.getProperty("isprivate");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (boolean) value;
}else{
Object result = super.getIsPrivate();
return (boolean)result;
}
}
@Override
public void setRoleList(java.util.ArrayList roleList) {
setPropertyValue("rolelist",roleList);
}
@Override
public long getHomeSpaceId() {
Serializable value = _impl.getProperty("homespaceid");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getHomeSpaceId();
return (long)result;
}
}
@Override
public void setModifiedBy(long modifiedBy) {
setPropertyValue("modifiedby",modifiedBy);
}
@Override
public java.util.ArrayList getRoleList() {
Serializable value = _impl.getProperty("rolelist");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
((ManagePojo)value).setRegistrationKey(((ManagePojo)value).getRegistrationKey());
((ManagePojo)value).setPropertyValue("rolelist",null);
return (java.util.ArrayList) value;
}else{
Object result = super.getRoleList();
if(result == null && value!=null){
result = value;
}
return (java.util.ArrayList)result;
}
}
@Override
public void setServiceId(long serviceId) {
setPropertyValue("serviceid",serviceId);
}
@Override
public java.util.Date getModifiedOn() {
Serializable value = _impl.getProperty("modifiedon");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (java.util.Date) value;
}else{
Object result = super.getModifiedOn();
return (java.util.Date)result;
}
}
@Override
public boolean getIsCommunity() {
Serializable value = _impl.getProperty("iscommunity");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (boolean) value;
}else{
Object result = super.getIsCommunity();
return (boolean)result;
}
}
@Override
public void setCreatedBy(long createdBy) {
setPropertyValue("createdby",createdBy);
}
@Override
public boolean getIsGeneric() {
Serializable value = _impl.getProperty("isgeneric");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (boolean) value;
}else{
Object result = super.getIsGeneric();
return (boolean)result;
}
}
@Override
public long getSpaceTypeId() {
Serializable value = _impl.getProperty("spacetypeid");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getSpaceTypeId();
return (long)result;
}
}
@Override
public void setModuleSlimList(java.util.ArrayList moduleSlimList) {
setPropertyValue("moduleslimlist",moduleSlimList);
}
@Override
public void setSceneSlimList(java.util.ArrayList sceneSlimList) {
setPropertyValue("sceneslimlist",sceneSlimList);
}
@Override
public long getTappBanner() {
Serializable value = _impl.getProperty("tappbanner");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getTappBanner();
return (long)result;
}
}
@Override
public void setTappBanner(long tappBanner) {
setPropertyValue("tappbanner",tappBanner);
}
@Override
public java.lang.Boolean getIsDirty() {
Serializable value = _impl.getProperty("isdirty");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (java.lang.Boolean) value;
}else{
Object result = super.getIsDirty();
return (java.lang.Boolean)result;
}
}
@Override
public void setCreatedOn(java.util.Date createdOn) {
setPropertyValue("createdon",createdOn);
}
@Override
public com.trupublic.shared.store.TappVariableStore getTappVariableStore() {
Serializable value = _impl.getProperty("tappvariablestore");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (com.trupublic.shared.store.TappVariableStore) value;
}else{
Object result = super.getTappVariableStore();
return (com.trupublic.shared.store.TappVariableStore)result;
}
}
@Override
public java.util.ArrayList getThingList() {
Serializable value = _impl.getProperty("thinglist");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
((ManagePojo)value).setRegistrationKey(((ManagePojo)value).getRegistrationKey());
((ManagePojo)value).setPropertyValue("thinglist",null);
return (java.util.ArrayList) value;
}else{
Object result = super.getThingList();
if(result == null && value!=null){
result = value;
}
return (java.util.ArrayList)result;
}
}
@Override
public long getTimeTranslated() {
Serializable value = _impl.getProperty("timetranslated");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getTimeTranslated();
return (long)result;
}
}
@Override
public void setId(long id) {
setPropertyValue("id",id);
}
@Override
public boolean getIsKernel() {
Serializable value = _impl.getProperty("iskernel");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (boolean) value;
}else{
Object result = super.getIsKernel();
return (boolean)result;
}
}
@Override
public void setIsPrimary(boolean isPrimary) {
setPropertyValue("isprimary",isPrimary);
}
@Override
public long getTappIcon() {
Serializable value = _impl.getProperty("tappicon");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getTappIcon();
return (long)result;
}
}
@Override
public void setThingList(java.util.ArrayList thingList) {
setPropertyValue("thinglist",thingList);
}
@Override
public void setTimeModified(long timeModified) {
setPropertyValue("timemodified",timeModified);
}
@Override
public long getOwner() {
Serializable value = _impl.getProperty("owner");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getOwner();
return (long)result;
}
}
@Override
public void setModifiedOn(java.util.Date modifiedOn) {
setPropertyValue("modifiedon",modifiedOn);
}
@Override
public boolean getIsHome() {
Serializable value = _impl.getProperty("ishome");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (boolean) value;
}else{
Object result = super.getIsHome();
return (boolean)result;
}
}
@Override
public java.lang.String getName() {
Serializable value = _impl.getProperty("name");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (java.lang.String) value;
}else{
Object result = super.getName();
return (java.lang.String)result;
}
}
@Override
public void setSpaceSlim(long spaceSlim) {
setPropertyValue("spaceslim",spaceSlim);
}
@Override
public void setTappIcon(long tappIcon) {
setPropertyValue("tappicon",tappIcon);
}
@Override
public long getModifiedBy() {
Serializable value = _impl.getProperty("modifiedby");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getModifiedBy();
return (long)result;
}
}
@Override
public int getVersionId() {
Serializable value = _impl.getProperty("versionid");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (int) value;
}else{
Object result = super.getVersionId();
return (int)result;
}
}
@Override
public void setTappStatus(java.lang.String tappStatus) {
setPropertyValue("tappstatus",tappStatus);
}
@Override
public void setVersionId(int versionId) {
setPropertyValue("versionid",versionId);
}
@Override
public java.util.Date getCreatedOn() {
Serializable value = _impl.getProperty("createdon");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (java.util.Date) value;
}else{
Object result = super.getCreatedOn();
return (java.util.Date)result;
}
}
@Override
public void setIsPrivate(boolean isPrivate) {
setPropertyValue("isprivate",isPrivate);
}
@Override
public long getId() {
Serializable value = _impl.getProperty("id");
if(!Utils.isNullOrEmptyValue(value)){
if(value instanceof ManagePojo && ((ManagePojo)value).getEventBus()==null && this.getEventBus() != null)
((ManagePojo)value).setEventBus(this.getEventBus());
return (long) value;
}else{
Object result = super.getId();
return (long)result;
}
}
@Override
public void setBlobId(long blobId) {
setPropertyValue("blobid",blobId);
}
public String getPropertyTypeName(String propName) {
return typeMap.get(propName).getTypeName();
}
@Override
@Worker
public String toJson(Object jsValue) {
return _impl.toJson(jsValue);
}
/**
shrink the implementation to return _impl.fromJson(jsValue) */
@Override
public PojoMarker fromJson(JavaScriptObject jsValue) {
PojoMarker result = null;
result=_impl.fromJson(jsValue);
if(result != null)
return result ;
return this;
}
@Override
@Worker
public HashMap<String ,TypeKey> getPropertyTypeMap(){
return typeMap;
}
/*
the following method should be reworked to function in the following manner.
// fire the change event. Rename the method prepareAndFireEvent to fireChangeEvent
// use a single call to _impl.setProperty for all the properties. Validate inside the impl setProperty method
if the property being set exists in the pojo by using the type information. If not throw an exception
Investigate if we actually need the call to the base class setter for the property. Since that call is bloating this method
If we can do away with the base class call if would be terrific. for instance if we can formulate a js method and invoke it
will do the job too inwhich case many method calls in this class can be done away with and be replaced with dynamic invocations.
**/
@Worker
public void setPropertyValue(String propName,Object value){
SyncChange change=null;
if(!isSynced){
if(getEventBus()!= null) {
change=prepareAndFireEvent(propName,value);
}
}
switch(propName) {
case "tappdescription" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("tappdescription",(Serializable) value);
if(value != null){
super.setTappDescription((java.lang.String)value);
}
}
break;
case "isaddon" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("isaddon",(Serializable) value);
if(value != null){
super.setIsAddOn((boolean)value);
}
}
break;
case "spaceslimid" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("spaceslimid",(Serializable) value);
if(value != null){
super.setSpaceSlimId((long)value);
}
}
break;
case "issystem" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("issystem",(Serializable) value);
if(value != null){
super.setIsSystem((boolean)value);
}
}
break;
case "familyid" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("familyid",(Serializable) value);
if(value != null){
super.setFamilyId((long)value);
}
}
break;
case "ishome" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("ishome",(Serializable) value);
if(value != null){
super.setIsHome((boolean)value);
}
}
break;
case "spacetypeid" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("spacetypeid",(Serializable) value);
if(value != null){
super.setSpaceTypeId((long)value);
}
}
break;
case "iskernel" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("iskernel",(Serializable) value);
if(value != null){
super.setIsKernel((boolean)value);
}
}
break;
case "isgeneric" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("isgeneric",(Serializable) value);
if(value != null){
super.setIsGeneric((boolean)value);
}
}
break;
case "isdirty" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("isdirty",(Serializable) value);
if(value != null){
super.setIsDirty((boolean)value);
}
}
break;
case "istranslated" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("istranslated",(Serializable) value);
if(value != null){
super.setIsTranslated((boolean)value);
}
}
break;
case "tappvariablestore" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("tappvariablestore",(Serializable) value);
if(value != null){
super.setTappVariableStore((com.trupublic.shared.store.TappVariableStore)value);
}
}
break;
case "owner" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("owner",(Serializable) value);
if(value != null){
super.setOwner((long)value);
}
}
break;
case "homespaceid" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("homespaceid",(Serializable) value);
if(value != null){
super.setHomeSpaceId((long)value);
}
}
break;
case "actionablelist" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("actionablelist",(Serializable) value);
if(value != null){
super.setActionableList((java.util.ArrayList)value);
}
}
break;
case "name" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("name",(Serializable) value);
if(value != null){
super.setName((java.lang.String)value);
}
}
break;
case "iscommunity" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("iscommunity",(Serializable) value);
if(value != null){
super.setIsCommunity((boolean)value);
}
}
break;
case "timetranslated" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("timetranslated",(Serializable) value);
if(value != null){
super.setTimeTranslated((long)value);
}
}
break;
case "translatedjsonblob" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("translatedjsonblob",(Serializable) value);
if(value != null){
super.setTranslatedJsonBlob((long)value);
}
}
break;
case "rolelist" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("rolelist",(Serializable) value);
if(value != null){
super.setRoleList((java.util.ArrayList)value);
}
}
break;
case "modifiedby" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("modifiedby",(Serializable) value);
if(value != null){
super.setModifiedBy((long)value);
}
}
break;
case "serviceid" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("serviceid",(Serializable) value);
if(value != null){
super.setServiceId((long)value);
}
}
break;
case "createdby" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("createdby",(Serializable) value);
if(value != null){
super.setCreatedBy((long)value);
}
}
break;
case "moduleslimlist" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("moduleslimlist",(Serializable) value);
if(value != null){
super.setModuleSlimList((java.util.ArrayList)value);
}
}
break;
case "sceneslimlist" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("sceneslimlist",(Serializable) value);
if(value != null){
super.setSceneSlimList((java.util.ArrayList)value);
}
}
break;
case "tappbanner" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("tappbanner",(Serializable) value);
if(value != null){
super.setTappBanner((long)value);
}
}
break;
case "createdon" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("createdon",(Serializable) value);
if(value != null){
super.setCreatedOn((java.util.Date)value);
}
}
break;
case "id" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("id",(Serializable) value);
if(value != null){
super.setId((long)value);
}
}
break;
case "isprimary" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("isprimary",(Serializable) value);
if(value != null){
super.setIsPrimary((boolean)value);
}
}
break;
case "thinglist" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("thinglist",(Serializable) value);
if(value != null){
super.setThingList((java.util.ArrayList)value);
}
}
break;
case "timemodified" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("timemodified",(Serializable) value);
if(value != null){
super.setTimeModified((long)value);
}
}
break;
case "modifiedon" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("modifiedon",(Serializable) value);
if(value != null){
super.setModifiedOn((java.util.Date)value);
}
}
break;
case "spaceslim" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("spaceslim",(Serializable) value);
if(value != null){
super.setSpaceSlim((long)value);
}
}
break;
case "tappicon" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("tappicon",(Serializable) value);
if(value != null){
super.setTappIcon((long)value);
}
}
break;
case "tappstatus" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("tappstatus",(Serializable) value);
if(value != null){
super.setTappStatus((java.lang.String)value);
}
}
break;
case "versionid" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("versionid",(Serializable) value);
if(value != null){
super.setVersionId((int)value);
}
}
break;
case "isprivate" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("isprivate",(Serializable) value);
if(value != null){
super.setIsPrivate((boolean)value);
}
}
break;
case "blobid" :
if(_impl != null){
if(change!=null && value instanceof ObjectPeer){
getPeer().put(propName, ((ObjectPeer)change).getPeer().get("changevalue"));
addReferrer(value);
} else
_impl.setProperty("blobid",(Serializable) value);
if(value != null){
super.setBlobId((long)value);
}
}
break;
default : logger.log(Level.SEVERE, "property with name " + propName + "does not exists"); break;
}
}
public void setPropertyValue(String propName,Object value,boolean deepCopy){
if (getDeepCopyMap().containsKey(value) && getDeepCopyMap().get(value) != null) {
value = getDeepCopyMap().get(value);
}
switch(propName) {
case "tappdescription" :
if(_impl != null){
_impl.setProperty("tappdescription",(Serializable) value,deepCopy);
}
super.setTappDescription((java.lang.String)value);
break;
case "isaddon" :
if(_impl != null){
_impl.setProperty("isaddon",(Serializable) value,deepCopy);
}
super.setIsAddOn((boolean)value);
break;
case "spaceslimid" :
if(_impl != null){
_impl.setProperty("spaceslimid",(Serializable) value,deepCopy);
}
super.setSpaceSlimId((long)value);
break;
case "issystem" :
if(_impl != null){
_impl.setProperty("issystem",(Serializable) value,deepCopy);
}
super.setIsSystem((boolean)value);
break;
case "familyid" :
if(_impl != null){
_impl.setProperty("familyid",(Serializable) value,deepCopy);
}
super.setFamilyId((long)value);
break;
case "ishome" :
if(_impl != null){
_impl.setProperty("ishome",(Serializable) value,deepCopy);
}
super.setIsHome((boolean)value);
break;
case "spacetypeid" :
if(_impl != null){
_impl.setProperty("spacetypeid",(Serializable) value,deepCopy);
}
super.setSpaceTypeId((long)value);
break;
case "iskernel" :
if(_impl != null){
_impl.setProperty("iskernel",(Serializable) value,deepCopy);
}
super.setIsKernel((boolean)value);
break;
case "isgeneric" :
if(_impl != null){
_impl.setProperty("isgeneric",(Serializable) value,deepCopy);
}
super.setIsGeneric((boolean)value);
break;
case "isdirty" :
if(_impl != null){
_impl.setProperty("isdirty",(Serializable) value,deepCopy);
}
super.setIsDirty((boolean)value);
break;
case "istranslated" :
if(_impl != null){
_impl.setProperty("istranslated",(Serializable) value,deepCopy);
}
super.setIsTranslated((boolean)value);
break;
case "tappvariablestore" :
if(_impl != null){
_impl.setProperty("tappvariablestore",(Serializable) value,deepCopy);
}
super.setTappVariableStore((com.trupublic.shared.store.TappVariableStore)value);
break;
case "owner" :
if(_impl != null){
_impl.setProperty("owner",(Serializable) value,deepCopy);
}
super.setOwner((long)value);
break;
case "homespaceid" :
if(_impl != null){
_impl.setProperty("homespaceid",(Serializable) value,deepCopy);
}
super.setHomeSpaceId((long)value);
break;
case "actionablelist" :
if(_impl != null){
_impl.setProperty("actionablelist",(Serializable) value,deepCopy);
}
super.setActionableList((java.util.ArrayList)value);
break;
case "name" :
if(_impl != null){
_impl.setProperty("name",(Serializable) value,deepCopy);
}
super.setName((java.lang.String)value);
break;
case "iscommunity" :
if(_impl != null){
_impl.setProperty("iscommunity",(Serializable) value,deepCopy);
}
super.setIsCommunity((boolean)value);
break;
case "timetranslated" :
if(_impl != null){
_impl.setProperty("timetranslated",(Serializable) value,deepCopy);
}
super.setTimeTranslated((long)value);
break;
case "translatedjsonblob" :
if(_impl != null){
_impl.setProperty("translatedjsonblob",(Serializable) value,deepCopy);
}
super.setTranslatedJsonBlob((long)value);
break;
case "rolelist" :
if(_impl != null){
_impl.setProperty("rolelist",(Serializable) value,deepCopy);
}
super.setRoleList((java.util.ArrayList)value);
break;
case "modifiedby" :
if(_impl != null){
_impl.setProperty("modifiedby",(Serializable) value,deepCopy);
}
super.setModifiedBy((long)value);
break;
case "serviceid" :
if(_impl != null){
_impl.setProperty("serviceid",(Serializable) value,deepCopy);
}
super.setServiceId((long)value);
break;
case "createdby" :
if(_impl != null){
_impl.setProperty("createdby",(Serializable) value,deepCopy);
}
super.setCreatedBy((long)value);
break;
case "moduleslimlist" :
if(_impl != null){
_impl.setProperty("moduleslimlist",(Serializable) value,deepCopy);
}
super.setModuleSlimList((java.util.ArrayList)value);
break;
case "sceneslimlist" :
if(_impl != null){
_impl.setProperty("sceneslimlist",(Serializable) value,deepCopy);
}
super.setSceneSlimList((java.util.ArrayList)value);
break;
case "tappbanner" :
if(_impl != null){
_impl.setProperty("tappbanner",(Serializable) value,deepCopy);
}
super.setTappBanner((long)value);
break;
case "createdon" :
if(_impl != null){
_impl.setProperty("createdon",(Serializable) value,deepCopy);
}
super.setCreatedOn((java.util.Date)value);
break;
case "id" :
if(_impl != null){
_impl.setProperty("id",(Serializable) value,deepCopy);
}
super.setId((long)value);
break;
case "isprimary" :
if(_impl != null){
_impl.setProperty("isprimary",(Serializable) value,deepCopy);
}
super.setIsPrimary((boolean)value);
break;
case "thinglist" :
if(_impl != null){
_impl.setProperty("thinglist",(Serializable) value,deepCopy);
}
super.setThingList((java.util.ArrayList)value);
break;
case "timemodified" :
if(_impl != null){
_impl.setProperty("timemodified",(Serializable) value,deepCopy);
}
super.setTimeModified((long)value);
break;
case "modifiedon" :
if(_impl != null){
_impl.setProperty("modifiedon",(Serializable) value,deepCopy);
}
super.setModifiedOn((java.util.Date)value);
break;
case "spaceslim" :
if(_impl != null){
_impl.setProperty("spaceslim",(Serializable) value,deepCopy);
}
super.setSpaceSlim((long)value);
break;
case "tappicon" :
if(_impl != null){
_impl.setProperty("tappicon",(Serializable) value,deepCopy);
}
super.setTappIcon((long)value);
break;
case "tappstatus" :
if(_impl != null){
_impl.setProperty("tappstatus",(Serializable) value,deepCopy);
}
super.setTappStatus((java.lang.String)value);
break;
case "versionid" :
if(_impl != null){
_impl.setProperty("versionid",(Serializable) value,deepCopy);
}
super.setVersionId((int)value);
break;
case "isprivate" :
if(_impl != null){
_impl.setProperty("isprivate",(Serializable) value,deepCopy);
}
super.setIsPrivate((boolean)value);
break;
case "blobid" :
if(_impl != null){
_impl.setProperty("blobid",(Serializable) value,deepCopy);
}
super.setBlobId((long)value);
break;
default : logger.log(Level.SEVERE, "property with name " + propName + "does not exists"); break;
}
}
@Override
@Worker
public Serializable getPropertyValue(String propName){
Serializable result;
switch(propName) {
case "familyid" :
result = (Serializable)getFamilyId();
return result;
case "isaddon" :
result = (Serializable)getIsAddOn();
return result;
case "actionablelist" :
result = (Serializable)getActionableList();
return result;
case "moduleslimlist" :
result = (Serializable)getModuleSlimList();
return result;
case "tappdescription" :
result = (Serializable)getTappDescription();
return result;
case "tappstatus" :
result = (Serializable)getTappStatus();
return result;
case "blobid" :
result = (Serializable)getBlobId();
return result;
case "translatedjsonblob" :
result = (Serializable)getTranslatedJsonBlob();
return result;
case "sceneslimlist" :
result = (Serializable)getSceneSlimList();
return result;
case "createdby" :
result = (Serializable)getCreatedBy();
return result;
case "spaceslimid" :
result = (Serializable)getSpaceSlimId();
return result;
case "issystem" :
result = (Serializable)getIsSystem();
return result;
case "timemodified" :
result = (Serializable)getTimeModified();
return result;
case "istranslated" :
result = (Serializable)getIsTranslated();
return result;
case "serviceid" :
result = (Serializable)getServiceId();
return result;
case "isprimary" :
result = (Serializable)getIsPrimary();
return result;
case "spaceslim" :
result = (Serializable)getSpaceSlim();
return result;
case "isprivate" :
result = (Serializable)getIsPrivate();
return result;
case "homespaceid" :
result = (Serializable)getHomeSpaceId();
return result;
case "rolelist" :
result = (Serializable)getRoleList();
return result;
case "modifiedon" :
result = (Serializable)getModifiedOn();
return result;
case "iscommunity" :
result = (Serializable)getIsCommunity();
return result;
case "isgeneric" :
result = (Serializable)getIsGeneric();
return result;
case "spacetypeid" :
result = (Serializable)getSpaceTypeId();
return result;
case "tappbanner" :
result = (Serializable)getTappBanner();
return result;
case "isdirty" :
result = (Serializable)getIsDirty();
return result;
case "tappvariablestore" :
result = (Serializable)getTappVariableStore();
return result;
case "thinglist" :
result = (Serializable)getThingList();
return result;
case "timetranslated" :
result = (Serializable)getTimeTranslated();
return result;
case "iskernel" :
result = (Serializable)getIsKernel();
return result;
case "tappicon" :
result = (Serializable)getTappIcon();
return result;
case "owner" :
result = (Serializable)getOwner();
return result;
case "ishome" :
result = (Serializable)getIsHome();
return result;
case "name" :
result = (Serializable)getName();
return result;
case "modifiedby" :
result = (Serializable)getModifiedBy();
return result;
case "versionid" :
result = (Serializable)getVersionId();
return result;
case "createdon" :
result = (Serializable)getCreatedOn();
return result;
case "id" :
result = (Serializable)getId();
return result;
default : return null;
}
}
@Worker
public void setRegistrationKey(Serializable instanceRegistrationKey) {
_impl.setProperty(Constants.REGISTRATIONKEY, instanceRegistrationKey);
}
@Worker
public Serializable getRegistrationKey() {
return _impl.getProperty(Constants.REGISTRATIONKEY);
}
@Worker
public void setInstanceRegistry(InstanceRegistry instanceRegistry) {
this.instanceRegistry = instanceRegistry;
_impl.setInstanceRegistry(instanceRegistry);
}
@Worker
@Override
public void setInstanceRegistry(InstanceRegistry instanceRegistry,boolean setDeep) {
setInstanceRegistry(instanceRegistry);
if(setDeep)
_impl.updateInstanceRegistry(instanceRegistry,setDeep,(PojoMarker)this);
}
@Worker
public InstanceRegistry getInstanceRegistry() {
instanceRegistry=_impl.getInstanceRegistry();
return instanceRegistry;
}
@Worker
@Override
public void setEventBus(SimpleEventBus eventBus){
Serializable result=null;
if(((ManagePojo)this).getEventBus()==null){
this.eventBus =(SimpleEventBus) eventBus;
this.eventBus.addHandler(ApplyPojoMarkerChangeEvent.TYPE, this);
this.eventBus.addHandler(ApplyCollectionChangeEvent.TYPE, this);
prepareInstanceRegistry((Serializable)this);
result = _impl.getProperty ("familyid");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getFamilyId();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("isaddon");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getIsAddOn();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("actionablelist");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getActionableList();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((JsonCollection)result).setParentPojoMarker(this);
if(((ManagePojo)result).getRegistrationKey() == null)
((ManagePojo)result).setRegistrationKey(instanceRegistry.getRegistrationKey(result));
else
((ManagePojo)result).setRegistrationKey(((ManagePojo)result).getRegistrationKey());
((ManagePojo)result).setPropertyValue("actionablelist",result);
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("moduleslimlist");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getModuleSlimList();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((JsonCollection)result).setParentPojoMarker(this);
if(((ManagePojo)result).getRegistrationKey() == null)
((ManagePojo)result).setRegistrationKey(instanceRegistry.getRegistrationKey(result));
else
((ManagePojo)result).setRegistrationKey(((ManagePojo)result).getRegistrationKey());
((ManagePojo)result).setPropertyValue("moduleslimlist",result);
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("tappdescription");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getTappDescription();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("tappstatus");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getTappStatus();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("blobid");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getBlobId();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("translatedjsonblob");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getTranslatedJsonBlob();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("sceneslimlist");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getSceneSlimList();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((JsonCollection)result).setParentPojoMarker(this);
if(((ManagePojo)result).getRegistrationKey() == null)
((ManagePojo)result).setRegistrationKey(instanceRegistry.getRegistrationKey(result));
else
((ManagePojo)result).setRegistrationKey(((ManagePojo)result).getRegistrationKey());
((ManagePojo)result).setPropertyValue("sceneslimlist",result);
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("createdby");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getCreatedBy();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("spaceslimid");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getSpaceSlimId();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("issystem");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getIsSystem();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("timemodified");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getTimeModified();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("istranslated");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getIsTranslated();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("serviceid");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getServiceId();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("isprimary");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getIsPrimary();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("spaceslim");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getSpaceSlim();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("isprivate");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getIsPrivate();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("homespaceid");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getHomeSpaceId();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("rolelist");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getRoleList();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((JsonCollection)result).setParentPojoMarker(this);
if(((ManagePojo)result).getRegistrationKey() == null)
((ManagePojo)result).setRegistrationKey(instanceRegistry.getRegistrationKey(result));
else
((ManagePojo)result).setRegistrationKey(((ManagePojo)result).getRegistrationKey());
((ManagePojo)result).setPropertyValue("rolelist",result);
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("modifiedon");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getModifiedOn();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("iscommunity");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getIsCommunity();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("isgeneric");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getIsGeneric();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("spacetypeid");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getSpaceTypeId();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("tappbanner");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getTappBanner();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("isdirty");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getIsDirty();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("tappvariablestore");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getTappVariableStore();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("thinglist");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getThingList();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((JsonCollection)result).setParentPojoMarker(this);
if(((ManagePojo)result).getRegistrationKey() == null)
((ManagePojo)result).setRegistrationKey(instanceRegistry.getRegistrationKey(result));
else
((ManagePojo)result).setRegistrationKey(((ManagePojo)result).getRegistrationKey());
((ManagePojo)result).setPropertyValue("thinglist",result);
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("timetranslated");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getTimeTranslated();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("iskernel");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getIsKernel();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("tappicon");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getTappIcon();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("owner");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getOwner();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("ishome");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getIsHome();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("name");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getName();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("modifiedby");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getModifiedBy();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("versionid");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getVersionId();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("createdon");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getCreatedOn();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
result = _impl.getProperty ("id");
if(Utils.isNullOrEmptyValue(result))
result=(Serializable)super.getId();
if(result instanceof ManagePojo){
if(this.getInstanceRegistry()!=null){
((ObjectJsonizer)result).setInstanceRegistry(this.getInstanceRegistry());
}
((ManagePojo)result).setEventBus(eventBus);
}
}
}
@Worker
@Override
public SimpleEventBus getEventBus(){
return eventBus;
}
@Override
@Worker
public void onApplyPojoMarkerChange(ApplyPojoMarkerChangeEvent event){
SyncChange change = event.getEventData();
if (((ManagePojo)this).getRegistrationKey().equals(change.getParentInstanceId())) {
String propName = change.getPropertyName();
Serializable changedValue = null;
if (change instanceof IntrinsicChange) {
changedValue = ((IntrinsicChange) change).getChangeValue();
} else if (change instanceof PojoMarkerChange) {
changedValue = ((PojoMarkerChange) change).getChangeValue();
}
this.isSynced=true;
setPropertyValue(propName, changedValue);
}
}
@Override
@Worker
public void onApplyArrayListAddElementChange(ApplyArrayListAddElementChangeEvent event){
_impl.onApplyArrayListAddElementChange(event);
}
@Worker
@Override
public void onApplyHashMapChnage(ApplyHashMapChangeEvent event) {
_impl.onApplyHashMapChange(event);
}
@Override
@Worker
public void onApplyTreeMapChnage(ApplyTreeMapChangeEvent event) {
_impl.onApplyTreeMapChange(event);
}
@Override
@Worker
public void onApplyHashSetChnage(ApplyHashSetChangeEvent event) {
_impl.onApplyHashSetChange(event);
}
@Override
@Worker
public void onApplyArrayListClearChange(ApplyArrayListClearChangeEvent event){
_impl.onApplyArrayListClearChange(event);
}
@Override
@Worker
public void onApplyArrayListRemoveElementChange(ApplyArrayListRemoveChangeEvent event){
_impl.onApplyArrayListRemoveElementChange(event);
}
@Override
@Worker
public void onApplyLinkedListAddElementChangeEvent(ApplyLinkedListAddElementChangeEvent event){
_impl.onApplyLinkedListAddElementChangeEvent(event);
}
@Override
@Worker
public void setGuid(String guid){
this.guid = guid;
if(_impl != null)
_impl.setProperty(Constants.GUID, (Serializable) guid);
}
@Override
@Worker
public String getGuid(){
return (String) _impl.getProperty(Constants.GUID);
}
@Worker
public SyncChange prepareAndFireEvent(String propname, Object value) {
return _impl.prepareAndFireEvent(propname,value);
}
@Worker
private void generateTypeInfoMap(){
HashMap<String,TypeInfo> propTypeInfo = new HashMap<String,TypeInfo>();
TypeInfo typeInfo = null;
typeInfo = new TypeInfo();
typeInfo.addPropertyAnnotationDetail("com.trupublic.shared.annotation.IgnoreProperty","enabled","false");
propTypeInfo.put("suggestiondisplay",typeInfo);
propTypeInfo.put("suggestiondisplay",typeInfo);
typeInfo = new TypeInfo();
propTypeInfo.put("slimid",typeInfo);
typeInfo = new TypeInfo();
propTypeInfo.put("exposedthingslist",typeInfo);
typeInfo = new TypeInfo();
propTypeInfo.put("exposedthingaselementlist",typeInfo);
typeInfo = new TypeInfo();
propTypeInfo.put("instanceprovider",typeInfo);
typeInfo = new TypeInfo();
typeInfo.addPropertyAnnotationDetail("com.trupublic.shared.annotation.IgnoreProperty","enabled","false");
propTypeInfo.put("suggestionhtml",typeInfo);
propTypeInfo.put("suggestionhtml",typeInfo);
typeInfo = new TypeInfo();
propTypeInfo.put("thingbyname",typeInfo);
setTypeInfoMap(propTypeInfo);
}
@Override
@Worker
public TypeInfo getTypeInfo(String propName){
return typeInfoMap.get(propName);
}
@Worker
public void setTypeInfoMap(HashMap<String,TypeInfo> typeInfo){
this.typeInfoMap = typeInfo;
}
@Worker
public void prepareInstanceRegistry(Serializable propertyValue) {
_impl.prepareInstanceRegistry(propertyValue);
}
@Override
@Worker
public PojoMarker toPojoMarker(AltEntity entity) {
HashMap<String,Serializable> propertyMap = entity.getPropertyMap();
for(String propName : propertyMap.keySet()){
Object propValue =propertyMap.get(propName);
if(propValue instanceof AltEntity)
propValue = getEntityConverted((AltEntity)propValue);
setPropertyValue(propName,propValue);
}
return this;
}
public Serializable getEntityConverted(AltEntity entity){
AltType entityType = entity.getType();
String typeName = entityType.getTypeName();
if (PojoMarkerImplInstantiatorRegistry.get().isRegistered(typeName)) {
return JsonizerGinjector.INSTANCE.getJsonizerParser().toPojoMarker(entity);
}
return null;
}
@Worker
public Serializable removeInstanceFromInstanceRegistry(Serializable value) {
try {
if (value instanceof ManagePojo) {
if (getInstanceRegistry() != null) {
Serializable regKey = ((ManagePojo) value).getRegistrationKey();
if (getInstanceRegistry().isInstanceKeyRegistered(regKey,null)) {
value = (Serializable) getInstanceRegistry().getRegisteredInstance(regKey);
getInstanceRegistry().removeInstanceFromRegistry(regKey);
return value;
}
}
}
} catch (Exception e) {
throw new AltJsonizerException(getClass().getCanonicalName() + ":: rempveInstanceFromRegistry() :: " + e);
}
return value;
}
@Worker
@Override
public Object createDeepCopy(){
Object object=deepCopy();
setDeepCopyMap(null);
return object;
}
@Worker
@Override
public Object deepCopy(){
try {
PojoMarker pojomarker =null;
if (deepCopyMap == null) {
deepCopyMap = new HashMap<Object, Object>();
setDeepCopyMap(deepCopyMap);
}
ManagePojo object =null;
object=_impl.deepCopy();
return object;
} catch (Exception e) {
throw new AltJsonizerException(getClass().getCanonicalName() + " :: createDeepCopy() :: " + e);
}
}
@Worker
public PojoMarker createNewInstance() {
PojoMarker pojomarker=GWT.create(TappSlim.class);
getDeepCopyMap().put(this, pojomarker);
((DeepCopy) pojomarker).setDeepCopyMap(getDeepCopyMap());
return pojomarker;
}
@Worker
@Override
public JSONObject getPeer() {
if(_impl instanceof org.appops.jsonizer.client.impls.JSBasePojoMarkerImpl)
return ((org.appops.jsonizer.client.impls.JSBasePojoMarkerImpl)_impl).getJsonObject();
return null;
}
@Worker
@Override
public void setPeer(JSONObject jsonObject) {
if(_impl instanceof org.appops.jsonizer.client.impls.JSBasePojoMarkerImpl)
((org.appops.jsonizer.client.impls.JSBasePojoMarkerImpl)_impl).setJsonObject(jsonObject,true);
}
@Override
public HashMap<Object, Object> getDeepCopyMap() {
return deepCopyMap;
}
@Override
public void setDeepCopyMap(HashMap<Object, Object> deepCopyMap) {
this.deepCopyMap = deepCopyMap;
}
@Override
public void onCascadeDeleteEvent(CascadeDeleteEvent event) {
Preconditions.checkNotNull(event.getEventData(), "Cascade delete Event data cannot be null.");
PojoMarker pojoMarker = event.getEventData();
Serializable regKey = ((ManagePojo) pojoMarker).getRegistrationKey();
Preconditions.checkNotNull(regKey, "Cascade delete Event data registration key cannot be null.");
if (pojoMarker == this)
getInstanceRegistry().removeInstanceFromRegistry(regKey);
}
@Override
public void addReferrer(Object ref) {
_impl.addReferrer(ref);
}
@Override
public void removeAllReferences() {
_impl.removeAllReferences();
}
@Override
public String getSelectorId() {
return _impl.getSelectorId();
}
@Override
public String getSelectorPattern() {
return _impl.getSelectorPattern();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment