Package org.jboss.system.server.profileservice.persistence.xml

Examples of org.jboss.system.server.profileservice.persistence.xml.PersistedArrayValue


    * @return
    */
   protected PersistedArrayValue createArrayValue(ArrayValue value, ArrayMetaType metaType)
   {
      //
      PersistedArrayValue array = new PersistedArrayValue();
      MetaType elementType = metaType.getElementType();
      for (int i = 0; i < value.getLength(); i++)
      {
         PersistedValue persistedValue = null;
         Object subElement = value.getValue(i);

         if (subElement instanceof MetaValue)
         {
            persistedValue = createPersistedValue((MetaValue) subElement, elementType);
         }
         else if (subElement != null && subElement.getClass().isArray())
         {
            persistedValue = unwrapArray(array, subElement, elementType);
         }
         // Add to parent
         array.addValue(persistedValue);
      }
      return array;
   }
View Full Code Here


    * @param type the element meta type
    * @return the persistence xml meta data
    */
   protected PersistedArrayValue unwrapArray(PersistedArrayValue array, Object element, MetaType type)
   {
      PersistedArrayValue newElement = new PersistedArrayValue();
      int subSize = Array.getLength(element);
      for (int i = 0; i < subSize; i++)
      {
         PersistedValue persistedValue = null;
         Object subElement = Array.get(element, i);
         if (subElement instanceof MetaValue)
         {
            persistedValue = createPersistedValue((MetaValue) subElement, type);
         }
         else if (subElement != null && subElement.getClass().isArray())
         {
            persistedValue = unwrapArray(newElement, subElement, type);
         }

         newElement.addValue(persistedValue);
      }
      return newElement;
   }
View Full Code Here

      {
         return new PersistedTableValue();
      }
      else if(metaType.isArray())
      {
         return new PersistedArrayValue();
      }
      else if(metaType.isProperties())
      {
         return new PersistedPropertiesValue();
      }
View Full Code Here

TOP

Related Classes of org.jboss.system.server.profileservice.persistence.xml.PersistedArrayValue

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.