Package javax.persistence

Examples of javax.persistence.EnumType


     */
    private void endEnumerated() {
        String text = currentText();
        if (StringUtils.isEmpty(text))
            return;
        EnumType type = Enum.valueOf(EnumType.class, text);

        FieldMapping fm = (FieldMapping) currentElement();
        String strat = EnumValueHandler.class.getName() + "(StoreOrdinal="
            + String.valueOf(type == EnumType.ORDINAL) + ")";
        if (fm.isElementCollection())
View Full Code Here


     */
    private void endMapKeyEnumerated() {
        String text = currentText();
        if (StringUtils.isEmpty(text))
            return;
        EnumType type = Enum.valueOf(EnumType.class, text);

        FieldMapping fm = (FieldMapping) currentElement();
        String strat = EnumValueHandler.class.getName() + "(StoreOrdinal="
            + String.valueOf(type == EnumType.ORDINAL) + ")";
        fm.getKeyMapping().getValueInfo().setStrategy(strat);
View Full Code Here

        if (temporal != null) {
            addAnnotation(Temporal.class, fmd).
                add(null, temporal);
        }

        EnumType enumType = getEnumType(field);
        if (enumType != null && enumType != EnumType.ORDINAL) {
            addAnnotation(Enumerated.class, fmd).
                add(null, enumType);
        }
    }
View Full Code Here

     */
    private void endMapKeyEnumerated() {
        String text = currentText();
        if (StringUtils.isEmpty(text))
            return;
        EnumType type = Enum.valueOf(EnumType.class, text);

        FieldMapping fm = (FieldMapping) currentElement();
        String strat = EnumValueHandler.class.getName() + "(StoreOrdinal="
            + String.valueOf(type == EnumType.ORDINAL) + ")";
        fm.getKeyMapping().getValueInfo().setStrategy(strat);
View Full Code Here

     */
    private void endEnumerated() {
        String text = currentText();
        if (StringUtils.isEmpty(text))
            return;
        EnumType type = Enum.valueOf(EnumType.class, text);

        FieldMapping fm = (FieldMapping) currentElement();
        String strat = EnumValueHandler.class.getName() + "(StoreOrdinal="
            + String.valueOf(type == EnumType.ORDINAL) + ")";
        if (fm.isElementCollection())
View Full Code Here

     */
    private void endMapKeyEnumerated() {
        String text = currentText();
        if (StringUtils.isEmpty(text))
            return;
        EnumType type = Enum.valueOf(EnumType.class, text);

        FieldMapping fm = (FieldMapping) currentElement();
        String strat = EnumValueHandler.class.getName() + "(StoreOrdinal="
            + String.valueOf(type == EnumType.ORDINAL) + ")";
        fm.getKeyMapping().getValueInfo().setStrategy(strat);
View Full Code Here

        if (temporal != null) {
            addAnnotation(Temporal.class, fmd).
                add(null, temporal);
        }

        EnumType enumType = getEnumType(field);
        if (enumType != null && enumType != EnumType.ORDINAL) {
            addAnnotation(Enumerated.class, fmd).
                add(null, enumType);
        }
    }
View Full Code Here

            startElement("temporal");
            addText(temporal.toString());
            endElement("temporal");
        }

        EnumType enumType = getEnumType(field);
        if (enumType != null && enumType != EnumType.ORDINAL) {
            startElement("enumerated");
            addText(enumType.toString());
            endElement("enumerated");
        }
    }
View Full Code Here

     */
    private void endEnumerated() {
        String text = currentText();
        if (StringUtils.isEmpty(text))
            return;
        EnumType type = Enum.valueOf(EnumType.class, text);

        FieldMapping fm = (FieldMapping) currentElement();
        String strat = EnumValueHandler.class.getName() + "(StoreOrdinal="
            + String.valueOf(type == EnumType.ORDINAL) + ")";
        fm.getValueInfo().setStrategy(strat);
View Full Code Here

                JpaAttribute attribute,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            if (attribute instanceof JpaBasic) {
                EnumType enumType = element.getAnnotation(Enumerated.class).value();
                ((JpaBasic) attribute).setEnumerated(enumType);
            }
            else {
                super.onAttribute(attribute, element, context);
            }
View Full Code Here

TOP

Related Classes of javax.persistence.EnumType

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.