Hibernate ORM Component - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM Component class.

This code example shows how to use the following methods:getComponentClassName, isDynamic
			} 
		} 
	} 
 
	private static void addComponent(Map components, Component comp) {
		if(!comp.isDynamic()) {
			Component existing = (Component) components.put(comp.getComponentClassName(), comp);
			 
			if(existing!=null) {
				log.warn("Component " + existing.getComponentClassName() + " found more than once! Will only generate the last found.");
			} 
		} else { 
			log.debug("dynamic-component found. Ignoring it as a component, but will collect any embedded components."); 
		}	 
		collectComponents( components, new ComponentPOJOClass(comp, new Cfg2JavaTool()).getAllPropertiesIterator());		
	} 
 
} 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getComponentClassName, isDynamic
	public Object accept(SimpleValue o) {
		return null; // TODO: return o.getTypeName() ? (it is not an association) 
	} 
	 
	public Object accept(Component component) {
		if(component.isDynamic()) {
			return null; //"java.util.Map"; (not an association) 
		} 
		return component.getComponentClassName();
	} 
} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:addProperty, getPropertySpan, getTable, setTable

6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:isDynamic
	public Object accept(DependantValue value) {
		throw new IllegalArgumentException("No tag for " + value);
	} 
 
	public Object accept(Component component) {
		return component.isDynamic()?"dynamic-component":"component";
	} 
 
	public Object accept(ManyToOne mto) {
		return "many-to-one"; 
	} 
 
	public Object accept(OneToOne oto) {
		return "one-to-one"; 
	} 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getComponentClassName
		return super.accept(o);
	} 
 
	public Object accept(Component value) {
		// composite-element breaks without it. 
		return value.getComponentClassName();
	} 
		 
	public Object accept(OneToOne o) {
		return acceptToOne(o);
	} 
	 
	public Object accept(ManyToOne o) {
		return acceptToOne(o);
	} 
	 
	private Object acceptToOne(ToOne value) {
		return value.getReferencedEntityName(); // should get the cfg and lookup the persistenclass.			
	} 
	 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getComponentClassName
	public DynamicComponentTuplizer(Component component) {
		super( component );
	} 
 
	protected Instantiator buildInstantiator(Component component) {
		return new DynamicInstantiator( component.getComponentClassName() );	//To change body of overridden methods use File | Settings | File Templates.
	} 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getPropertyIterator
        SimpleIdMapperBuilder mapper;
        if (id_mapper != null) {
            // Multiple id 
 
            mapper = new MultipleIdMapper(((Component) pc.getIdentifier()).getComponentClassName());
            if (!addIdProperties(rel_id_mapping, (Iterator<Property>) id_mapper.getPropertyIterator(), mapper, false, audited)) {
                return null; 
            } 
 
            // null mapper - the mapping where already added the first time, now we only want to generate the xml 
            if (!addIdProperties(orig_id_mapping, (Iterator<Property>) id_mapper.getPropertyIterator(), null, true, audited)) {
                return null; 
            } 
        } else if (id_prop.isComposite()) {
            // Embedded id 
 
            Component id_component = (Component) id_prop.getValue();
 
            mapper = new EmbeddedIdMapper(getIdPropertyData(id_prop), id_component.getComponentClassName());
            if (!addIdProperties(rel_id_mapping, (Iterator<Property>) id_component.getPropertyIterator(), mapper, false, audited)) {
4
CodeRank
Experience pair programming with AI  Get Codota for Java