Package org.exoplatform.webui.application.replication.model

Examples of org.exoplatform.webui.application.replication.model.TypeModel


               ReplicatableTypeModel<?> typeModel = (ReplicatableTypeModel)context.getTypeDomain().getTypeModel(clazz);

               //
               Map<FieldModel, Object> state = new HashMap<FieldModel, Object>();
               TypeModel currentTypeModel = typeModel;
               List<Bilto> biltos = new ArrayList<Bilto>();
               while (currentTypeModel != null)
               {
                  if (currentTypeModel instanceof ReplicatableTypeModel)
                  {
                     for (FieldModel fieldModel : currentTypeModel.getFields())
                     {
                        if (!fieldModel.isTransient())
                        {
                           switch (container.readInt())
                           {
                              case DataKind.NULL_VALUE:
                                 state.put(fieldModel, null);
                                 break;
                              case DataKind.OBJECT_REF:
                                 int refId = container.readInt();
                                 Object refO = idToObject.get(refId);
                                 if (refO != null)
                                 {
                                    state.put(fieldModel, refO);
                                 }
                                 else
                                 {
                                    biltos.add(new Bilto(refId, fieldModel));
                                 }
                                 break;
                              case DataKind.OBJECT:
                                 Object o = container.readObject();
                                 state.put(fieldModel, o);
                                 break;

                           }
                        }
                     }
                  }
                  currentTypeModel = currentTypeModel.getSuperType();
               }

               //
               Object instance = instantiate(typeModel, state);
View Full Code Here


         output.writeObject(id);
      }
      else
      {
         Class<? extends Object> objClass = obj.getClass();
         TypeModel typeModel = context.getTypeDomain().getTypeModel(objClass);

         //
         if (typeModel == null)
         {
            throw new NotSerializableException("Object " + obj + " does not have its type described");
View Full Code Here

TOP

Related Classes of org.exoplatform.webui.application.replication.model.TypeModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.