Package org.paquitosoft.lml.model.annotation

Examples of org.paquitosoft.lml.model.annotation.PersistentAttribute.columnName()


            // We first need to find the attribute in the related entity representing the main entity in this action
            List<Field> fields = ModelUtilities.getAllPersistentEntityFields(relatedEntity.getClass());
            for (Field f : fields) {
                PersistentAttribute a = f.getAnnotation(PersistentAttribute.class);
                if (a != null && columnName.equalsIgnoreCase(a.columnName())) {
                    f.setAccessible(true);

                    if (f.getClass().getAnnotation(PersistentEntity.class) != null) {
                        List<Field> pkFields = ModelUtilities.getEntityIdentifierFields(f.getClass());
                        if (pkFields.size() == 1) {
View Full Code Here


    public static String getColumnName(Field f) {
       
        String result = f.getName();       
        PersistentAttribute att = f.getAnnotation(PersistentAttribute.class);           
        if (att != null) {
            result = (att.columnName().length() > 0) ? att.columnName().toUpperCase(): f.getName().toUpperCase();
        }           
        return result;
    }

    /**
 
View Full Code Here

    public static String getColumnName(Field f) {
       
        String result = f.getName();       
        PersistentAttribute att = f.getAnnotation(PersistentAttribute.class);           
        if (att != null) {
            result = (att.columnName().length() > 0) ? att.columnName().toUpperCase(): f.getName().toUpperCase();
        }           
        return result;
    }

    /**
 
View Full Code Here

       
        Object result = null;
       
        for (Field f : getAllPersistentEntityFields(entity.getClass())) {
            PersistentAttribute antt = f.getAnnotation(PersistentAttribute.class);           
            if ((antt.columnName().length() > 0 && fieldName.equalsIgnoreCase(antt.columnName())) ||
                    fieldName.equalsIgnoreCase(f.getName())){
                try {
                    f.setAccessible(true);
                    if (antt.entity()) {
                        result = getEntityIdentifier(f.get(entity))// TODO Does it worth it to check the identifier here?
View Full Code Here

       
        Object result = null;
       
        for (Field f : getAllPersistentEntityFields(entity.getClass())) {
            PersistentAttribute antt = f.getAnnotation(PersistentAttribute.class);           
            if ((antt.columnName().length() > 0 && fieldName.equalsIgnoreCase(antt.columnName())) ||
                    fieldName.equalsIgnoreCase(f.getName())){
                try {
                    f.setAccessible(true);
                    if (antt.entity()) {
                        result = getEntityIdentifier(f.get(entity))// TODO Does it worth it to check the identifier here?
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.