Package org.hibernate.mapping

Examples of org.hibernate.mapping.Property


        while (cmd != null){
          EntityPOJOClass pc = new EntityPOJOClass(cmd, new Cfg2JavaTool()); // TODO: we should extract the needed functionallity from this hbm2java class.
           
          Iterator allPropertiesIterator = pc.getAllPropertiesIterator();
            while ( allPropertiesIterator.hasNext() ) {
          Property property = (Property) allPropertiesIterator.next();
          String candidate = property.getName();
            if (prefix.length() == 0 || candidate.toLowerCase().startsWith(prefix.toLowerCase())) {
              HQLCompletionProposal proposal = createStartWithCompletionProposal( prefix, cursorPosition, HQLCompletionProposal.PROPERTY, candidate );
              proposal.setEntityName( cmd.getEntityName() );
              proposal.setProperty( property );
              proposal.setPropertyName( candidate );         
View Full Code Here


        String idName = cmd.getIdentifierProperty()==null?null:cmd.getIdentifierProperty().getName();
        if (attribute.equals(idName)) {
            return cmd.getIdentifierProperty().getValue();
        }
        try {
          Property property = cmd.getProperty( attribute );
          return property==null?null:property.getValue();
        } catch (HibernateException he) {
          return null;
        }
               
    }
View Full Code Here

            attributeName = attributeName.substring(0, idx);
        }
        Iterator names = t.getPropertyIterator();
        int i = 0;
        while ( names.hasNext() ) {
      Property element = (Property) names.next();
      String name = element.getName();
      if (attributeName.equals(name)) {
                return element.getValue();
            }
            i++;
        }
        return null;
    }
View Full Code Here

            return;
        }
        Iterator props = t.getPropertyIterator();
        int i = 0;
        while ( props.hasNext() ) {
      Property element = (Property) props.next();     
      String candidate = element.getName();
      if (candidate.toLowerCase().startsWith(prefix.toLowerCase())) {
        HQLCompletionProposal proposal = createStartWithCompletionProposal( prefix, cursorPosition, HQLCompletionProposal.PROPERTY, candidate );
        //proposal.setEntityName( cmd.getEntityName() ); ...we don't know here..TODO: pass in the "path"
          proposal.setPropertyName( candidate );
          proposal.setProperty(element);
View Full Code Here

  private Iterator getToStringPropertiesIterator(Iterator iter) {
    List properties = new ArrayList();

    while ( iter.hasNext() ) {
      Property element = (Property) iter.next();
      if ( c2j.getMetaAsBool( element, "use-in-tostring" ) ) {
        properties.add( element );
      }
    }
View Full Code Here

  private Iterator getEqualsHashCodePropertiesIterator(Iterator iter) {
    List properties = new ArrayList();

    while ( iter.hasNext() ) {
      Property element = (Property) iter.next();
      if ( usePropertyInEquals(element) ) {
        properties.add( element );
      }
    }
View Full Code Here

    return needsToString( iter );
  }
 
  private boolean needsToString(Iterator iter) {
    while ( iter.hasNext() ) {
      Property element = (Property) iter.next();
      if ( c2j.getMetaAsBool( element, "use-in-tostring" ) ) {
        return true;
      }
    }
    return false;
View Full Code Here

        return true;
      } else if (field.getValue() instanceof Component) {
        Component c = (Component) field.getValue();
        Iterator it = c.getPropertyIterator();
        while ( it.hasNext() ) {
          Property prop = (Property) it.next();
          if(isRequiredInConstructor(prop)) {
            return true;
          }
        }
      }
View Full Code Here

  public boolean hasNext() {
    if ( backLog!=null ) {
      return true;
    } else if ( delegate.hasNext() ) {
      Property nextProperty = (Property) delegate.next();
      while ( nextProperty.isBackRef() && delegate.hasNext() ) {
        nextProperty = (Property) delegate.next();
      }
      if ( !nextProperty.isBackRef() ) {
        backLog = nextProperty;
        return true;
      }
    }
    return false;
View Full Code Here

    return false;
  }

  public Object next() {
    if ( backLog != null ) {
      Property p = backLog;
      backLog = null;
      return p;
    }
    Property nextProperty = (Property) delegate.next();
    while ( nextProperty.isBackRef() && delegate.hasNext() ) {
      nextProperty = (Property) delegate.next();
    }
    if ( nextProperty.isBackRef() ) {
      throw new NoSuchElementException();
    }
    return nextProperty;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.mapping.Property

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.