Package com.force.sdk.jpa.schema

Examples of com.force.sdk.jpa.schema.ForceClassMetaData


     * Processes annotations at the class level.
     */
    @Override
    protected AbstractClassMetaData processClassAnnotations(PackageMetaData pmd, Class cls,
            AnnotationObject[] annotations, ClassLoaderResolver clr) {
        AbstractClassMetaData acmd = new ForceClassMetaData(pmd, cls.getSimpleName());
        if (annotations != null && annotations.length > 0) {
            for (int i = 0; i < annotations.length; i++) {
                AnnotationObject annotation = annotations[i];
                if (annotation.getName().equals(CustomObject.class.getName())) {
     
                    Map nameValues = annotation.getNameValueMap();
                    for (Method m : CustomObject.class.getDeclaredMethods()) {
                        Object value = nameValues.get(m.getName());
                        if (value != null && !value.equals(m.getDefaultValue())) {
                            // Only store the non-default values
                            acmd.addExtension(ForceStoreManager.FORCE_KEY, m.getName(), value.toString());
                        }
                    }
                } else {
                    throw new NucleusUserException("Unknown Force.com annotation: " + annotation.getName());
                }
View Full Code Here

TOP

Related Classes of com.force.sdk.jpa.schema.ForceClassMetaData

Copyright © 2018 www.massapicom. 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.