if ( annotationInstanceList == null || annotationInstanceList.isEmpty() ) {
return;
}
List<AnnotationInstance> newAnnotationInstanceList = new ArrayList<AnnotationInstance>( annotationInstanceList.size() );
for ( AnnotationInstance annotationInstance : annotationInstanceList ) {
AnnotationValue cascadeValue = annotationInstance.value( "cascade" );
List<AnnotationValue> newAnnotationValueList = new ArrayList<AnnotationValue>();
newAnnotationValueList.addAll( annotationInstance.values() );
if ( cascadeValue == null ) {
AnnotationValue temp = AnnotationValue.createEnumValue( "", JPADotNames.CASCADE_TYPE, "PERSIST" );
cascadeValue = AnnotationValue.createArrayValue( "cascade", new AnnotationValue[] { temp } );
}
else {
newAnnotationValueList.remove( cascadeValue );
String[] cascadeTypes = cascadeValue.asEnumArray();