Examples of MetaAttribute


Examples of org.hibernate.mapping.MetaAttribute

      if ( onlyInheritable & !inheritable ) {
        continue;
      }
      String name = metaNode.attributeValue( "attribute" );

      MetaAttribute meta = (MetaAttribute) map.get( name );
      MetaAttribute inheritedAttribute = (MetaAttribute) inheritedMeta.get( name );
      if ( meta == null  ) {
        meta = new MetaAttribute( name );
        map.put( name, meta );
      } else if (meta == inheritedAttribute) { // overriding inherited meta attribute. HBX-621 & HBX-793
        meta = new MetaAttribute( name );
        map.put( name, meta );
      }
      meta.addValue( metaNode.getText() );
    }
    return map;
View Full Code Here

Examples of org.hibernate.mapping.MetaAttribute

      if ( onlyInheritable & !inheritable ) {
        continue;
      }
      String name = metaNode.attributeValue( "attribute" );

      MetaAttribute meta = (MetaAttribute) map.get( name );
      MetaAttribute inheritedAttribute = (MetaAttribute) inheritedMeta.get( name );
      if ( meta == null  ) {
        meta = new MetaAttribute( name );
        map.put( name, meta );
      } else if (meta == inheritedAttribute) { // overriding inherited meta attribute. HBX-621 & HBX-793
        meta = new MetaAttribute( name );
        map.put( name, meta );
      }
      meta.addValue( metaNode.getText() );
    }
    return map;
View Full Code Here

Examples of org.hibernate.mapping.MetaAttribute

    s.close();
  }

  public void testMeta() throws Exception {
    PersistentClass clazz = getCfg().getClassMapping( Master.class.getName() );
    MetaAttribute meta = clazz.getMetaAttribute("foo");
    assertTrue( "foo".equals( meta.getValue() ) );
    meta = clazz.getProperty("name").getMetaAttribute("bar");
    assertTrue( meta.isMultiValued() );
  }
View Full Code Here

Examples of org.hibernate.mapping.MetaAttribute

      if ( onlyInheritable & !inheritable ) {
        continue;
      }
      String name = metaNode.attributeValue( "attribute" );

      MetaAttribute meta = (MetaAttribute) map.get( name );
      MetaAttribute inheritedAttribute = (MetaAttribute) inheritedMeta.get( name );
      if ( meta == null  ) {
        meta = new MetaAttribute( name );
        map.put( name, meta );
      } else if (meta == inheritedAttribute) { // overriding inherited meta attribute. HBX-621 & HBX-793
        meta = new MetaAttribute( name );
        map.put( name, meta );
      }
      meta.addValue( metaNode.getText() );
    }
    return map;
View Full Code Here

Examples of org.hibernate.mapping.MetaAttribute

    /**
     * @param property
     */
    private void markAsUseInEquals(Property property) {
        Map m = new HashMap();
        MetaAttribute ma = new MetaAttribute("use-in-equals");
        ma.addValue("true");
        m.put(ma.getName(),ma);
        property.setMetaAttributes(m);
    }
View Full Code Here

Examples of org.hibernate.mapping.MetaAttribute

  /**
   * Returns all meta items as one large string.
   *
   */
  public String getMetaAsString(MetaAttributable pc, String attribute) {
    MetaAttribute c = pc.getMetaAttribute( attribute );

    return MetaAttributeHelper.getMetaAsString( c );
  }
View Full Code Here

Examples of org.hibernate.mapping.MetaAttribute

 
  // called by subclasses
  protected void init() {
    importContext = new ImportContextImpl(getPackageName());
   
    MetaAttribute metaAttribute = meta.getMetaAttribute("extra-import");
    if(metaAttribute!=null) {
      Iterator values = metaAttribute.getValues().iterator();
      while ( values.hasNext() ) {
        String element = (String) values.next();
        importContext.importType(element);       
      }
    } 
View Full Code Here

Examples of org.hibernate.mapping.MetaAttribute

  }
 
  protected abstract String getMappedClassName();

  public String getMetaAsString(String attribute) {
    MetaAttribute c = meta.getMetaAttribute( attribute );
    return MetaAttributeHelper.getMetaAsString( c );
  }
View Full Code Here

Examples of org.hibernate.mapping.MetaAttribute

  public boolean getMetaAsBool(String attribute, boolean defaultValue) {
    return MetaAttributeHelper.getMetaAsBool( meta.getMetaAttribute( attribute ), defaultValue );
  }

  public String getClassJavaDoc(String fallback, int indent) {
    MetaAttribute c = meta.getMetaAttribute( CLASS_DESCRIPTION );
    if ( c == null ) {
      return c2j.toJavaDoc( fallback, indent );
    }
    else {
      return c2j.toJavaDoc( getMetaAsString( CLASS_DESCRIPTION ), indent );
View Full Code Here

Examples of org.hibernate.mapping.MetaAttribute

  public boolean hasFieldJavaDoc(Property property) {
    return property.getMetaAttribute("field-description")!=null;
  }
 
  public String getFieldJavaDoc(Property property, int indent) {
    MetaAttribute c = property.getMetaAttribute( "field-description" );
    if ( c == null ) {
      return c2j.toJavaDoc( "", indent );
    }
    else {
      return c2j.toJavaDoc( c2j.getMetaAsString( property, "field-description" ), indent );
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.