Search in sources :

Example 1 with AnnotationValue

use of com.emc.storageos.db.common.schema.AnnotationValue in project coprhd-controller by CoprHD.

the class MigrationHandlerImpl method dumpChanges.

/**
 * Dump schema changes we are processing to the log
 *
 * @param diff
 */
public void dumpChanges(DbSchemasDiff diff) {
    log.info("Start dumping changes");
    for (AnnotationValue newValue : diff.getNewAnnotationValues()) {
        log.info("new annotation value for class {}, field {}," + " annotation type {}: {}={}", new Object[] { newValue.getCfClass().getSimpleName(), newValue.getFieldName(), newValue.getAnnoClass().getSimpleName(), newValue.getName(), newValue.getValue() });
    }
    for (FieldInfo newField : diff.getNewFields()) {
        log.info("new field for class {}: {}", newField.getCfClass().getSimpleName(), newField.getName());
    }
    for (AnnotationType newAnno : diff.getNewClassAnnotations()) {
        log.info("new class annotation for class {}: {}", newAnno.getCfClass().getSimpleName(), newAnno.getType());
    }
    for (AnnotationType newAnno : diff.getNewFieldAnnotations()) {
        log.info("new field annotation for class {}, field {}: {}", new Object[] { newAnno.getCfClass().getSimpleName(), newAnno.getFieldName(), newAnno.getType() });
    }
    for (DbSchema schema : diff.getNewClasses()) {
        log.info("new CF: {}", schema.getType());
    }
    log.info("Finish dumping changes");
}
Also used : DbSchema(com.emc.storageos.db.common.schema.DbSchema) AnnotationValue(com.emc.storageos.db.common.schema.AnnotationValue) FieldInfo(com.emc.storageos.db.common.schema.FieldInfo) AnnotationType(com.emc.storageos.db.common.schema.AnnotationType)

Aggregations

AnnotationType (com.emc.storageos.db.common.schema.AnnotationType)1 AnnotationValue (com.emc.storageos.db.common.schema.AnnotationValue)1 DbSchema (com.emc.storageos.db.common.schema.DbSchema)1 FieldInfo (com.emc.storageos.db.common.schema.FieldInfo)1