Examples of JDOField


Examples of com.sun.jdo.api.persistence.enhancer.meta.JDOMetaDataProperties.JDOField

     * Tests whether a field of a class is known to be persistent.
     */
    public boolean isPersistentField(String classPath, String fieldName)
        throws JDOMetaDataUserException, JDOMetaDataFatalError
    {
        JDOField field = getJDOField (classPath, fieldName);
        return (field != null  ?  field.isPersistent ()  false);
    }
View Full Code Here

Examples of com.sun.jdo.api.persistence.enhancer.meta.JDOMetaDataProperties.JDOField

     * Tests whether a field of a class is known to be transactional.
     */
    public boolean isTransactionalField(String classPath, String fieldName)
        throws JDOMetaDataUserException, JDOMetaDataFatalError
    {
        JDOField field = getJDOField (classPath, fieldName);
        return (field != null  ?  field.isTransactional ()  false);
    }
View Full Code Here

Examples of com.sun.jdo.api.persistence.enhancer.meta.JDOMetaDataProperties.JDOField

     * Tests whether a field of a class is known to be Primary Key.
     */
    public boolean isPrimaryKeyField(String classPath, String fieldName)
        throws JDOMetaDataUserException, JDOMetaDataFatalError
    {
        JDOField field = getJDOField (classPath, fieldName);
        return (field != null  ?  field.isPk ()  false);
    }
View Full Code Here

Examples of com.sun.jdo.api.persistence.enhancer.meta.JDOMetaDataProperties.JDOField

     * Default Fetch Group.
     */
    public boolean isDefaultFetchGroupField(String classPath, String fieldName)
        throws JDOMetaDataUserException, JDOMetaDataFatalError
    {
        JDOField field = getJDOField (classPath, fieldName);
        return (field != null  ?  field.isInDefaultFetchGroup ()  false);
    }
View Full Code Here

Examples of com.sun.jdori.model.jdo.JDOField

    }

    String getAttributeName(int fieldNum)
    {
        JDOClass jdoClass = Helper.getJDOClass(pc.getClass());
        JDOField jdoField = jdoClass.getField(fieldNum);
        String attributeName = jdoField.getName();
        return attributeName;
    }
View Full Code Here

Examples of org.apache.jdo.model.jdo.JDOField

    {
        final JDOClass clazz = getJDOClass(classPath);
        if (clazz == null) {
            return null;
        }
        final JDOField field = clazz.getDeclaredField(fieldName);
        affirm(field == null || field.getDeclaringClass() == clazz,
               "field not declared in class: " + classPath + "." + fieldName);
        return field;
    }
View Full Code Here

Examples of org.apache.jdo.model.jdo.JDOField

    private boolean hasFieldModifier(String classPath,
                                     String fieldName,
                                     int fieldModifier)
        throws EnhancerMetaDataUserException, EnhancerMetaDataFatalError
    {
        final JDOField field = getJDOField(classPath, fieldName);
        if (field == null) {
            return false;
        }
        final int pm = field.getPersistenceModifier();
        affirm(pm != PersistenceModifier.UNSPECIFIED,
               "field modifier 'UNSPECIFIED': " + classPath + "." + fieldName);
        return (pm & fieldModifier) != 0;
    }
View Full Code Here

Examples of org.apache.jdo.model.jdo.JDOField

                   "cannot find class file for class: " + classPath);
            JavaField javaField = javaClass.getJavaField(fieldName);
            affirm(javaField != null,
                   "cannot find java field " + classPath + "." + fieldName);
            JavaType fieldType = javaField.getType();
            JDOField field = clazz.getField(fieldName);
            // if field not known by JDOClass (not specified in JDO XML),
            // create the field only if the model's method of default
            // calculation would yield a persistent field.  We must not
            // change the models state by newly created fields with
            // a persistence-modifier "none", because this would lead to
            // in a different annotation by isKnownNonManagedField().
            if (field == null
                && TypeSupport.isPersistenceFieldType(fieldType)) {
                field = clazz.createJDOField(fieldName);
                affirm(field != null,
                       "cannot create JDO field: "
                       + classPath + "." + fieldName);
            }
            field.setJavaField(javaField);
            affirm(fieldType == field.getType());
            affirm(field.getPersistenceModifier()
                   != PersistenceModifier.UNSPECIFIED,
                   "known, unspecified JDO field: " + classPath + "." + fieldName);
        } catch (ModelFatalException ex) {
            throw new EnhancerMetaDataUserException(ex);
        } catch (ModelException ex) {
View Full Code Here

Examples of org.apache.jdo.model.jdo.JDOField

                return true;
            }
           
            // check whether field is managed only if field's
            // persistence-modifier is known by the JDO model
            final JDOField field = clazz.getField(fieldName);
            if (field != null && (field.getPersistenceModifier()
                                  != PersistenceModifier.UNSPECIFIED)) {
                // only field's persistence-modifier known by model
                return !field.isManaged();
            }

            // field not known by JDOClass (not specified in JDO XML)
            // apply model's method of default calculation without
            // changing the model's state
View Full Code Here

Examples of org.apache.jdo.model.jdo.JDOField

     * Tests whether a field of a class is known to be Key.
     */
    public boolean isKeyField(String classPath, String fieldName)
        throws EnhancerMetaDataUserException, EnhancerMetaDataFatalError
    {
        final JDOField field = getJDOField(classPath, fieldName);
        if (field == null) {
            return false;
        }
        return field.isPrimaryKey();
    }
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.