public AccessMethodsMetadata(MetadataAnnotation virtualAccessMethods, MetadataAccessor accessor) { super(virtualAccessMethods, accessor); if (virtualAccessMethods.getName().equals(VirtualAccessMethods.class.getName())) { if (virtualAccessMethods.hasAttribute("get")) { this.getMethodName = virtualAccessMethods.getAttributeString("get"); } if (virtualAccessMethods.hasAttribute("set")) { this.setMethodName = virtualAccessMethods.getAttributeString("set"); } } }
/** INTERNAL: */ public NamedStoredProcedureQueryMetadata( MetadataAnnotation namedStoredProcedureQuery, MetadataAccessor accessor) { super(namedStoredProcedureQuery, accessor); for (Object storedProcedureParameter : namedStoredProcedureQuery.getAttributeArray("parameters")) { m_parameters.add( new StoredProcedureParameterMetadata( (MetadataAnnotation) storedProcedureParameter, accessor)); } // JPA spec allows for multiple result classes. for (Object resultClass : (Object[]) namedStoredProcedureQuery.getAttributeArray("resultClasses")) { m_resultClasses.add(getMetadataClass((String) resultClass)); } // JPA spec allows for multiple result set mappings. for (Object resultSetMapping : (Object[]) namedStoredProcedureQuery.getAttributeArray("resultSetMappings")) { m_resultSetMappings.add((String) resultSetMapping); } m_procedureName = namedStoredProcedureQuery.getAttributeString("procedureName"); // Don't default these booleans as we want to know if the user has actually set them. m_returnsResultSet = namedStoredProcedureQuery.getAttributeBooleanDefaultFalse("returnsResultSet"); m_multipleResultSets = namedStoredProcedureQuery.getAttributeBooleanDefaultFalse("multipleResultSets"); m_callByIndex = namedStoredProcedureQuery.getAttributeBooleanDefaultFalse("callByIndex"); }
/** INTERNAL: */ public ManyToManyAccessor( MetadataAnnotation manyToMany, MetadataAnnotatedElement annotatedElement, ClassAccessor classAccessor) { super(manyToMany, annotatedElement, classAccessor); setMappedBy(manyToMany.getAttributeString("mappedBy")); }
/** INTERNAL: Used for annotation loading. */ public ColumnMetadata(MetadataAnnotation column, MetadataAccessor accessor) { super(column, accessor); if (column != null) { // Apply the values from the column annotation. setUnique(column.getAttributeBooleanDefaultFalse("unique")); setScale(column.getAttributeInteger("scale")); setLength(column.getAttributeInteger("length")); setPrecision(column.getAttributeInteger("precision")); setTable(column.getAttributeString("table")); } }