Package com.dooapp.gaedo.properties

Examples of com.dooapp.gaedo.properties.AbstractPropertyAdapter


          // Add a fancy-schmancy property to maintain order in this town (this property is NOT indexed)
          edgeForVertex.setProperty(Properties.collection_index.name(), order++);
        } else {
          // Element is a literal value, so it won't require a vertex, but a literal saving
          AbstractPropertyAdapter elementByIndexProperty = new LiteralInCollectionUpdaterProperty(p, order, element);
          updateLiteralPropertyIn(service.getDatabase(), toUpdate, rootVertex, elementByIndexProperty, element);
          suspectProperties.remove(GraphUtils.getEdgeNameFor(elementByIndexProperty));
          // We also add an inverted property allowing fast query of containing collection
          // Value here is not signifiant : we only want to mark collection as containing value. And for that, one simple string is enough
          AbstractPropertyAdapter elementByValueProperty = new LiteralInCollectionUpdaterProperty(p, element, ELEMENT_IN_COLLECTION_MARKER);
          updateLiteralPropertyIn(service.getDatabase(), toUpdate, rootVertex, elementByValueProperty, ELEMENT_IN_COLLECTION_MARKER);
          suspectProperties.remove(GraphUtils.getEdgeNameFor(elementByValueProperty));
          order++;
        }
      }
View Full Code Here


          // Add a fancy-schmancy property to maintain order in this town (this property is NOT indexed)
          edgeForVertex.setProperty(Properties.collection_index.name(), order++);
        } else {
          // Element is a literal value, so it won't require a vertex, but a literal saving
          AbstractPropertyAdapter elementByIndexProperty = new LiteralInCollectionUpdaterProperty(p, order, element);
          updateLiteralPropertyIn(service.getDatabase(), toUpdate, rootVertex, elementByIndexProperty, element);
          suspectProperties.remove(GraphUtils.getEdgeNameFor(elementByIndexProperty));
          // We also add an inverted property allowing fast query of containing collection
          // Value here is not signifiant : we only want to mark collection as containing value. And for that, one simple string is enough
          AbstractPropertyAdapter elementByValueProperty = new LiteralInCollectionUpdaterProperty(p, element, ELEMENT_IN_COLLECTION_MARKER);
          updateLiteralPropertyIn(service.getDatabase(), toUpdate, rootVertex, elementByValueProperty, ELEMENT_IN_COLLECTION_MARKER);
          suspectProperties.remove(GraphUtils.getEdgeNameFor(elementByValueProperty));
          order++;
        }
      }
View Full Code Here

          // Add a fancy-schmancy property to maintain order in this town (this property is NOT indexed)
          edgeForVertex.setProperty(Properties.collection_index.name(), order++);
        } else {
          // Element is a literal value, so it won't require a vertex, but a literal saving
          AbstractPropertyAdapter elementByIndexProperty = new CollectionAccessByIndexProperty(p, order, element);
          updateLiteralPropertyIn(service.getDatabase(), toUpdate, rootVertex, elementByIndexProperty, element);
          suspectProperties.remove(GraphUtils.getEdgeNameFor(elementByIndexProperty));
          // We also add an inverted property allowing fast query of containing collection
          // Value here is not signifiant : we only want to mark collection as containing value. And for that, one simple string is enough
          AbstractPropertyAdapter elementByValueProperty = new CollectionAccessByValueProperty(p, element, ELEMENT_IN_COLLECTION_MARKER);
          elementByValueProperty.setGenericType(ELEMENT_IN_COLLECTION_MARKER.getClass());
          updateLiteralPropertyIn(service.getDatabase(), toUpdate, rootVertex, elementByValueProperty, ELEMENT_IN_COLLECTION_MARKER);
          suspectProperties.remove(GraphUtils.getEdgeNameFor(elementByValueProperty));
          order++;
        }
      }
View Full Code Here

          // Add a fancy-schmancy property to maintain order in this town (this property is NOT indexed)
          edgeForVertex.setProperty(Properties.collection_index.name(), order++);
        } else {
          // Element is a literal value, so it won't require a vertex, but a literal saving
          AbstractPropertyAdapter elementByIndexProperty = new LiteralInCollectionUpdaterProperty(p, order, element);
          updateLiteralPropertyIn(service.getDatabase(), toUpdate, rootVertex, elementByIndexProperty, element);
          suspectProperties.remove(GraphUtils.getEdgeNameFor(elementByIndexProperty));
          // We also add an inverted property allowing fast query of containing collection
          // Value here is not signifiant : we only want to mark collection as containing value. And for that, one simple string is enough
          AbstractPropertyAdapter elementByValueProperty = new LiteralInCollectionUpdaterProperty(p, element, ELEMENT_IN_COLLECTION_MARKER);
          elementByValueProperty.setGenericType(ELEMENT_IN_COLLECTION_MARKER.getClass());
          updateLiteralPropertyIn(service.getDatabase(), toUpdate, rootVertex, elementByValueProperty, ELEMENT_IN_COLLECTION_MARKER);
          suspectProperties.remove(GraphUtils.getEdgeNameFor(elementByValueProperty));
          order++;
        }
      }
View Full Code Here

          loaders.put(index, new LoadValueBehindEdge(e));
        }
      }
      // Not all values were laoded from external edges, maybe they're stored as properties ...
      for (int index = 0; index < collectionSize; index++) {
        AbstractPropertyAdapter elementByIndexProperty = new LiteralInCollectionUpdaterProperty(property, index, null);
        if(rootVertex.getPropertyKeys().contains(GraphUtils.getEdgeNameFor(elementByIndexProperty))) {
          loaders.put(index, new LoadValueInProperty(elementByIndexProperty));
        }
      }
View Full Code Here

TOP

Related Classes of com.dooapp.gaedo.properties.AbstractPropertyAdapter

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.