javax.persistence.NamedAttributeNode Java Examples

The following examples show how to use javax.persistence.NamedAttributeNode. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JPAOverriddenAnnotationReader.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
private static void bindNamedAttributeNodes(Element subElement, AnnotationDescriptor ann) {
	List<Element> namedAttributeNodes = subElement.elements("named-attribute-node");
	List<NamedAttributeNode> annNamedAttributeNodes = new ArrayList<>(  );
	for(Element namedAttributeNode : namedAttributeNodes){
		AnnotationDescriptor annNamedAttributeNode = new AnnotationDescriptor( NamedAttributeNode.class );
		copyStringAttribute( annNamedAttributeNode, namedAttributeNode, "value", "name", true );
		copyStringAttribute( annNamedAttributeNode, namedAttributeNode, "subgraph", false );
		copyStringAttribute( annNamedAttributeNode, namedAttributeNode, "key-subgraph", false );
		annNamedAttributeNodes.add( AnnotationFactory.create( annNamedAttributeNode ) );
	}
	ann.setValue( "attributeNodes", annNamedAttributeNodes.toArray( new NamedAttributeNode[annNamedAttributeNodes.size()] ) );
}