private AnnotationInstance parserSqlResultSetMappings(Collection<JaxbSqlResultSetMapping> namedQueries) { AnnotationValue[] values = new AnnotationValue[namedQueries.size()]; int i = 0; for ( Iterator<JaxbSqlResultSetMapping> iterator = namedQueries.iterator(); iterator.hasNext(); ) { AnnotationInstance annotationInstance = parserSqlResultSetMapping( iterator.next() ); values[i++] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } return create( SQL_RESULT_SET_MAPPINGS, null, new AnnotationValue[] { AnnotationValue.createArrayValue( "values", values ) } ); }
private AnnotationInstance parserSqlResultSetMappings(Collection<JaxbSqlResultSetMapping> namedQueries) { AnnotationValue[] values = new AnnotationValue[namedQueries.size()]; int i = 0; for ( Iterator<JaxbSqlResultSetMapping> iterator = namedQueries.iterator(); iterator.hasNext(); ) { AnnotationInstance annotationInstance = parserSqlResultSetMapping( iterator.next() ); values[i++] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } return create( SQL_RESULT_SET_MAPPINGS, null, new AnnotationValue[] { AnnotationValue.createArrayValue( "values", values ) } ); }
private AnnotationInstance parserNamedNativeQueries(Collection<JaxbNamedNativeQuery> namedQueries) { AnnotationValue[] values = new AnnotationValue[namedQueries.size()]; int i = 0; for ( Iterator<JaxbNamedNativeQuery> iterator = namedQueries.iterator(); iterator.hasNext(); ) { AnnotationInstance annotationInstance = parserNamedNativeQuery( iterator.next() ); values[i++] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } return create( NAMED_NATIVE_QUERIES, null, new AnnotationValue[] { AnnotationValue.createArrayValue( "values", values ) } ); }
private AnnotationInstance parserNamedNativeQueries(Collection<JaxbNamedNativeQuery> namedQueries) { AnnotationValue[] values = new AnnotationValue[namedQueries.size()]; int i = 0; for ( Iterator<JaxbNamedNativeQuery> iterator = namedQueries.iterator(); iterator.hasNext(); ) { AnnotationInstance annotationInstance = parserNamedNativeQuery( iterator.next() ); values[i++] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } return create( NAMED_NATIVE_QUERIES, null, new AnnotationValue[] { AnnotationValue.createArrayValue( "values", values ) } ); }
private AnnotationInstance parserNamedQueries(Collection<JaxbNamedQuery> namedQueries) { AnnotationValue[] values = new AnnotationValue[namedQueries.size()]; int i = 0; for ( Iterator<JaxbNamedQuery> iterator = namedQueries.iterator(); iterator.hasNext(); ) { AnnotationInstance annotationInstance = parserNamedQuery( iterator.next() ); values[i++] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } return create( NAMED_QUERIES, null, new AnnotationValue[] { AnnotationValue.createArrayValue( "values", values ) } ); }
private AnnotationInstance parserNamedQueries(Collection<JaxbNamedQuery> namedQueries) { AnnotationValue[] values = new AnnotationValue[namedQueries.size()]; int i = 0; for ( Iterator<JaxbNamedQuery> iterator = namedQueries.iterator(); iterator.hasNext(); ) { AnnotationInstance annotationInstance = parserNamedQuery( iterator.next() ); values[i++] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } return create( NAMED_QUERIES, null, new AnnotationValue[] { AnnotationValue.createArrayValue( "values", values ) } ); }
static void classArrayValue(String name, List<String> classNameList, List<AnnotationValue> list, ServiceRegistry serviceRegistry) { if ( isNotEmpty( classNameList ) ) { List<AnnotationValue> clazzValueList = new ArrayList<AnnotationValue>( classNameList.size() ); for ( String clazz : classNameList ) { addToCollectionIfNotNull( clazzValueList, classValue( "", clazz, serviceRegistry ) ); } list.add( AnnotationValue.createArrayValue( name, toArray( clazzValueList ) ) ); } }
static void enumArrayValue(String name, DotName typeName, List<Enum> valueList, List<AnnotationValue> list) { if ( isNotEmpty( valueList ) ) { List<AnnotationValue> enumValueList = new ArrayList<AnnotationValue>( valueList.size() ); for ( Enum e : valueList ) { addToCollectionIfNotNull( enumValueList, enumValue( "", typeName, e ) ); } list.add( AnnotationValue.createArrayValue( name, toArray( enumValueList ) ) ); } }
static void classArrayValue(String name, List<String> classNameList, List<AnnotationValue> list, ServiceRegistry serviceRegistry) { if ( isNotEmpty( classNameList ) ) { List<AnnotationValue> clazzValueList = new ArrayList<AnnotationValue>( classNameList.size() ); for ( String clazz : classNameList ) { addToCollectionIfNotNull( clazzValueList, classValue( "", clazz, serviceRegistry ) ); } list.add( AnnotationValue.createArrayValue( name, toArray( clazzValueList ) ) ); } }
static void enumArrayValue(String name, DotName typeName, List<Enum> valueList, List<AnnotationValue> list) { if ( isNotEmpty( valueList ) ) { List<AnnotationValue> enumValueList = new ArrayList<AnnotationValue>( valueList.size() ); for ( Enum e : valueList ) { addToCollectionIfNotNull( enumValueList, enumValue( "", typeName, e ) ); } list.add( AnnotationValue.createArrayValue( name, toArray( enumValueList ) ) ); } }
private void nestedEntityResultList(String name, List<JaxbEntityResult> entityResults, List<AnnotationValue> annotationValueList) { if ( MockHelper.isNotEmpty( entityResults ) ) { AnnotationValue[] values = new AnnotationValue[entityResults.size()]; for ( int i = 0; i < entityResults.size(); i++ ) { AnnotationInstance annotationInstance = parserEntityResult( entityResults.get( i ) ); values[i] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } MockHelper.addToCollectionIfNotNull( annotationValueList, AnnotationValue.createArrayValue( name, values ) ); } }
private void nestedQueryHintList(String name, List<JaxbQueryHint> constraints, List<AnnotationValue> annotationValueList) { if ( MockHelper.isNotEmpty( constraints ) ) { AnnotationValue[] values = new AnnotationValue[constraints.size()]; for ( int i = 0; i < constraints.size(); i++ ) { AnnotationInstance annotationInstance = parserQueryHint( constraints.get( i ) ); values[i] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } MockHelper.addToCollectionIfNotNull( annotationValueList, AnnotationValue.createArrayValue( name, values ) ); } }
private void nestedColumnResultList(String name, List<JaxbColumnResult> columnResults, List<AnnotationValue> annotationValueList) { if ( MockHelper.isNotEmpty( columnResults ) ) { AnnotationValue[] values = new AnnotationValue[columnResults.size()]; for ( int i = 0; i < columnResults.size(); i++ ) { AnnotationInstance annotationInstance = parserColumnResult( columnResults.get( i ) ); values[i] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } MockHelper.addToCollectionIfNotNull( annotationValueList, AnnotationValue.createArrayValue( name, values ) ); } }
protected void nestedUniqueConstraintList(String name, List<JaxbUniqueConstraint> constraints, List<AnnotationValue> annotationValueList) { if ( MockHelper.isNotEmpty( constraints ) ) { AnnotationValue[] values = new AnnotationValue[constraints.size()]; for ( int i = 0; i < constraints.size(); i++ ) { AnnotationInstance annotationInstance = parserUniqueConstraint( constraints.get( i ), null ); values[i] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } MockHelper.addToCollectionIfNotNull( annotationValueList, AnnotationValue.createArrayValue( name, values ) ); } }
private void nestedEntityResultList(String name, List<JaxbEntityResult> entityResults, List<AnnotationValue> annotationValueList) { if ( MockHelper.isNotEmpty( entityResults ) ) { AnnotationValue[] values = new AnnotationValue[entityResults.size()]; for ( int i = 0; i < entityResults.size(); i++ ) { AnnotationInstance annotationInstance = parserEntityResult( entityResults.get( i ) ); values[i] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } MockHelper.addToCollectionIfNotNull( annotationValueList, AnnotationValue.createArrayValue( name, values ) ); } }
private void nestedFieldResultList(String name, List<JaxbFieldResult> fieldResultList, List<AnnotationValue> annotationValueList) { if ( MockHelper.isNotEmpty( fieldResultList ) ) { AnnotationValue[] values = new AnnotationValue[fieldResultList.size()]; for ( int i = 0; i < fieldResultList.size(); i++ ) { AnnotationInstance annotationInstance = parserFieldResult( fieldResultList.get( i ) ); values[i] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } MockHelper.addToCollectionIfNotNull( annotationValueList, AnnotationValue.createArrayValue( name, values ) ); } }
protected void nestedUniqueConstraintList(String name, List<JaxbUniqueConstraint> constraints, List<AnnotationValue> annotationValueList) { if ( MockHelper.isNotEmpty( constraints ) ) { AnnotationValue[] values = new AnnotationValue[constraints.size()]; for ( int i = 0; i < constraints.size(); i++ ) { AnnotationInstance annotationInstance = parserUniqueConstraint( constraints.get( i ), null ); values[i] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } MockHelper.addToCollectionIfNotNull( annotationValueList, AnnotationValue.createArrayValue( name, values ) ); } }
private void nestedColumnResultList(String name, List<JaxbColumnResult> columnResults, List<AnnotationValue> annotationValueList) { if ( MockHelper.isNotEmpty( columnResults ) ) { AnnotationValue[] values = new AnnotationValue[columnResults.size()]; for ( int i = 0; i < columnResults.size(); i++ ) { AnnotationInstance annotationInstance = parserColumnResult( columnResults.get( i ) ); values[i] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } MockHelper.addToCollectionIfNotNull( annotationValueList, AnnotationValue.createArrayValue( name, values ) ); } }
private void nestedFieldResultList(String name, List<JaxbFieldResult> fieldResultList, List<AnnotationValue> annotationValueList) { if ( MockHelper.isNotEmpty( fieldResultList ) ) { AnnotationValue[] values = new AnnotationValue[fieldResultList.size()]; for ( int i = 0; i < fieldResultList.size(); i++ ) { AnnotationInstance annotationInstance = parserFieldResult( fieldResultList.get( i ) ); values[i] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } MockHelper.addToCollectionIfNotNull( annotationValueList, AnnotationValue.createArrayValue( name, values ) ); } }
private void nestedQueryHintList(String name, List<JaxbQueryHint> constraints, List<AnnotationValue> annotationValueList) { if ( MockHelper.isNotEmpty( constraints ) ) { AnnotationValue[] values = new AnnotationValue[constraints.size()]; for ( int i = 0; i < constraints.size(); i++ ) { AnnotationInstance annotationInstance = parserQueryHint( constraints.get( i ) ); values[i] = MockHelper.nestedAnnotationValue( "", annotationInstance ); } MockHelper.addToCollectionIfNotNull( annotationValueList, AnnotationValue.createArrayValue( name, values ) ); } }