Examples of BeanProperty


Examples of com.avaje.ebeaninternal.server.deploy.BeanProperty

        BeanDelta bp = new BeanDelta(desc, id);
       
        int count = dataInput.readInt();
        for (int i = 0; i < count; i++) {
            String propName = dataInput.readUTF();
            BeanProperty beanProperty = desc.getBeanProperty(propName);
            Object value = beanProperty.getScalarType().readData(dataInput);
            bp.add(beanProperty, value);
        }
        return bp;
    }
View Full Code Here

Examples of com.avaje.ebeaninternal.server.deploy.BeanProperty

  /**
   * Not supported for embedded id.
   */
  public BeanProperty findMatchImport(String matchDbColumn) {
   
    BeanProperty p = null;
    for (int i = 0; i < imported.length; i++) {
      p = imported[i].findMatchImport(matchDbColumn);
      if (p != null){
        return p;
      }
View Full Code Here

Examples of com.avaje.ebeaninternal.server.deploy.BeanProperty

        ElPropertyValue el = descriptor.getElGetValue(propertyName);
        if (el == null) {
            throw new PersistenceException("Property [" + propertyName + "] not found on " + descriptor.getFullName());
        } else {
          BeanProperty beanProperty = el.getBeanProperty();
          if (beanProperty.isId() || beanProperty.isDiscriminator()) {
            // For @Id properties we chop off the last part of the path
            propertyName = SplitName.parent(propertyName);
          } else if (beanProperty instanceof BeanPropertyAssocOne<?>) {
            String msg = "Column [" + column.getDbColumn() + "] mapped to complex Property[" + propertyName + "]";
            msg += ". It should be mapped to a simple property (proably the Id property). ";
View Full Code Here

Examples of com.avaje.ebeaninternal.server.deploy.BeanProperty

    EntityBeanIntercept ebi = persistRequest.getEntityBeanIntercept();
    int hash = ebi.getDirtyPropertyHash();
   
    BeanDescriptor<?> beanDescriptor = persistRequest.getBeanDescriptor();
   
    BeanProperty versionProperty = beanDescriptor.getVersionProperty();
    if (versionProperty != null) {
      if (ebi.isLoadedProperty(versionProperty.getPropertyIndex())) {
        hash = hash * 31 + 7;
      }
    }

    Integer key = Integer.valueOf(hash);
View Full Code Here

Examples of com.avaje.ebeaninternal.server.deploy.BeanProperty

  /**
   * Not supported for concatenated id.
   */
  public BeanProperty findMatchImport(String matchDbColumn) {
   
    BeanProperty p = null;
    for (int i = 0; i < imported.length; i++) {
      p = imported[i].findMatchImport(matchDbColumn);
      if (p != null){
        return p;
      }
View Full Code Here

Examples of com.avaje.ebeaninternal.server.deploy.BeanProperty

     
      if (prop instanceof DeployBeanPropertyAssocOne<?>){
        return new BeanPropertyAssocOne(owner, (DeployBeanPropertyAssocOne<?>)prop);
       
      } else {
        return new BeanProperty(prop);
      }
     
    }
View Full Code Here

Examples of com.avaje.ebeaninternal.server.deploy.BeanProperty

     * Add a many where join.
     */
    public void add(ElPropertyDeploy elProp) {
       
        String join = elProp.getElPrefix();
        BeanProperty p = elProp.getBeanProperty();
        if (p instanceof BeanPropertyAssocMany<?>){
            join = addManyToJoin(join, p.getName());         
        }
        if (join != null){
            addJoin(join);
            if (p != null) {
              String secondaryTableJoinPrefix = p.getSecondaryTableJoinPrefix();
              if (secondaryTableJoinPrefix != null) {
                addJoin(join+"."+secondaryTableJoinPrefix);
              }
            }
            addParentJoins(join);
View Full Code Here

Examples of com.avaje.ebeaninternal.server.deploy.BeanProperty

  @Test
  public void test() {
   
    SpiEbeanServer server = (SpiEbeanServer)Ebean.getServer(null);
    BeanDescriptor<TJodaEntity> beanDescriptor = server.getBeanDescriptor(TJodaEntity.class);
    BeanProperty beanProperty = beanDescriptor.getBeanProperty("localTime");
    ScalarType<?> scalarType = beanProperty.getScalarType();
   
    Assert.assertNotNull(scalarType);
  }
View Full Code Here

Examples of com.avaje.ebeaninternal.server.deploy.BeanProperty

        continue;
      }

      parent.writeColumnName(dbCol, p);

      BeanProperty importedProperty = importedId.findMatchImport(dbCol);
      if (importedProperty != null) {

        String columnDefn = ctx.getColumnDefn(importedProperty);
        ctx.write(columnDefn);
View Full Code Here

Examples of com.avaje.ebeaninternal.server.deploy.BeanProperty

    BeanPropertyAssocOne<?>[] assocOnes = desc.propertiesOne();
    for (int i = 0; i < assocOnes.length; i++) {
      if (assocOnes[i].isImportedPrimaryKey()) {
       
        // search using the ImportedId from the assoc one
        BeanProperty foreignMatch = assocOnes[i].getImportedId().findMatchImport(dbColumn);

        if (foreignMatch != null) {
          return new MatchedImportedProperty(assocOnes[i], foreignMatch, prop);
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.