Package org.slim3.util

Examples of org.slim3.util.RequestMap


                    Collection<TypeMirror> typeArgs =
                        classType.getActualTypeArguments();
                    if (typeArgs.isEmpty()) {
                        if (classDeclaration.equals(fieldDeclaration
                            .getDeclaringType())) {
                            throw new ValidationException(
                                MessageCode.SLIM3GEN1033,
                                env,
                                fieldDeclaration.getPosition());
                        }
                        throw new ValidationException(
                            MessageCode.SLIM3GEN1034,
                            env,
                            classDeclaration.getPosition(),
                            fieldDeclaration.getSimpleName(),
                            fieldDeclaration
View Full Code Here


            MethodDeclaration writeMethodDeclaration) {
        if (readMethodDeclaration == null) {
            String expectedReadMethodName =
                FieldDeclarationUtil.getReadMethodName(fieldDeclaration);
            if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
                throw new ValidationException(
                    MessageCode.SLIM3GEN1011,
                    env,
                    fieldDeclaration.getPosition(),
                    expectedReadMethodName);
            }
            throw new ValidationException(
                MessageCode.SLIM3GEN1024,
                env,
                classDeclaration.getPosition(),
                expectedReadMethodName,
                fieldDeclaration.getSimpleName(),
                fieldDeclaration.getDeclaringType().getQualifiedName());
        }
        if (writeMethodDeclaration == null) {
            String expectedWriteMethodName =
                FieldDeclarationUtil.getWriteMethodName(fieldDeclaration);
            if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
                throw new ValidationException(
                    MessageCode.SLIM3GEN1012,
                    env,
                    fieldDeclaration.getPosition(),
                    expectedWriteMethodName);
            }
            throw new ValidationException(
                MessageCode.SLIM3GEN1025,
                env,
                classDeclaration.getPosition(),
                expectedWriteMethodName,
                fieldDeclaration.getSimpleName(),
View Full Code Here

            MethodDeclaration writeMethodDeclaration) {
        if (readMethodDeclaration == null) {
            String expectedReadMethodName =
                FieldDeclarationUtil.getReadMethodName(fieldDeclaration);
            if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
                throw new ValidationException(
                    MessageCode.SLIM3GEN1011,
                    env,
                    fieldDeclaration.getPosition(),
                    expectedReadMethodName);
            }
            throw new ValidationException(
                MessageCode.SLIM3GEN1024,
                env,
                classDeclaration.getPosition(),
                expectedReadMethodName,
                fieldDeclaration.getSimpleName(),
                fieldDeclaration.getDeclaringType().getQualifiedName());
        }
        if (writeMethodDeclaration != null) {
            String fieldDefinition =
                String.format(
                    "%1$s %2$s = new %1$s(%3$s.class);",
                    fieldDeclaration.getType(),
                    fieldDeclaration.getSimpleName(),
                    modelRefType.getReferenceModelClassName());
            if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
                throw new ValidationException(
                    MessageCode.SLIM3GEN1041,
                    env,
                    writeMethodDeclaration.getPosition(),
                    fieldDeclaration.getSimpleName(),
                    fieldDefinition);
            }
            throw new ValidationException(
                MessageCode.SLIM3GEN1042,
                env,
                classDeclaration.getPosition(),
                fieldDeclaration.getSimpleName(),
                fieldDeclaration.getDeclaringType().getQualifiedName(),
View Full Code Here

            MethodDeclaration writeMethodDeclaration) {
        if (readMethodDeclaration == null) {
            String expectedReadMethodName =
                FieldDeclarationUtil.getReadMethodName(fieldDeclaration);
            if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
                throw new ValidationException(
                    MessageCode.SLIM3GEN1011,
                    env,
                    fieldDeclaration.getPosition(),
                    expectedReadMethodName);
            }
            throw new ValidationException(
                MessageCode.SLIM3GEN1024,
                env,
                classDeclaration.getPosition(),
                expectedReadMethodName,
                fieldDeclaration.getSimpleName(),
                fieldDeclaration.getDeclaringType().getQualifiedName());
        }
        if (writeMethodDeclaration != null) {
            String fieldDefinition =
                String.format(
                    "%1$s %2$s = new %1$s(%3$s.class, \"xxx\", this);",
                    fieldDeclaration.getType(),
                    fieldDeclaration.getSimpleName(),
                    inverseModelRefType.getReferenceModelClassName());
            if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
                throw new ValidationException(
                    MessageCode.SLIM3GEN1039,
                    env,
                    writeMethodDeclaration.getPosition(),
                    fieldDeclaration.getSimpleName(),
                    fieldDefinition,
                    classDeclaration.getSimpleName(),
                    inverseModelRefType.getReferenceModelClassName());
            }
            throw new ValidationException(
                MessageCode.SLIM3GEN1040,
                env,
                classDeclaration.getPosition(),
                fieldDeclaration.getSimpleName(),
                fieldDeclaration.getDeclaringType().getQualifiedName(),
View Full Code Here

     */
    protected void throwExceptionForNonCoreType(
            ClassDeclaration classDeclaration,
            FieldDeclaration fieldDeclaration, AnnotationMirror attribute) {
        if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
            throw new ValidationException(
                MessageCode.SLIM3GEN1005,
                env,
                fieldDeclaration.getPosition());
        }
        throw new ValidationException(
            MessageCode.SLIM3GEN1026,
            env,
            classDeclaration.getPosition(),
            fieldDeclaration.getSimpleName(),
            fieldDeclaration.getDeclaringType().getQualifiedName());
View Full Code Here

    protected void throwExceptionForConflictedElements(
            ClassDeclaration classDeclaration,
            FieldDeclaration fieldDeclaration, AnnotationMirror attribute,
            String element1, String element2) {
        if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
            throw new ValidationException(
                MessageCode.SLIM3GEN1021,
                env,
                attribute.getPosition(),
                element1,
                element2);
        }
        throw new ValidationException(
            MessageCode.SLIM3GEN1027,
            env,
            classDeclaration.getPosition(),
            element1,
            element2,
View Full Code Here

     */
    protected void throwExceptionForLobUnsupportedType(
            ClassDeclaration classDeclaration,
            FieldDeclaration fieldDeclaration, AnnotationMirror attribute) {
        if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
            throw new ValidationException(
                MessageCode.SLIM3GEN1045,
                env,
                fieldDeclaration.getPosition());
        }
        throw new ValidationException(
            MessageCode.SLIM3GEN1046,
            env,
            classDeclaration.getPosition(),
            fieldDeclaration.getSimpleName(),
            fieldDeclaration.getDeclaringType().getQualifiedName());
View Full Code Here

     *            the field declaration
     */
    protected void throwExceptionForModelRefTypeArgument(
            ClassDeclaration classDeclaration, FieldDeclaration fieldDeclaration) {
        if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
            throw new ValidationException(
                MessageCode.SLIM3GEN1031,
                env,
                fieldDeclaration.getPosition());
        }
        throw new ValidationException(
            MessageCode.SLIM3GEN1032,
            env,
            classDeclaration.getPosition(),
            fieldDeclaration.getSimpleName(),
            fieldDeclaration.getDeclaringType().getQualifiedName());
View Full Code Here

            Kind kind = primitiveType.getKind();
            dataType = getCorePrimitiveType(kind);
            if (dataType != null) {
                return;
            }
            throw new ValidationException(
                MessageCode.SLIM3GEN1002,
                env,
                declaration.getPosition(),
                kind.name().toLowerCase());
        }
View Full Code Here

                return null;
            }
            Collection<TypeMirror> typeArgs =
                declaredType.getActualTypeArguments();
            if (typeArgs.isEmpty()) {
                throw new ValidationException(
                    MessageCode.SLIM3GEN1004,
                    env,
                    declaration.getPosition(),
                    declaredType);
            }
            TypeMirror elementType = typeArgs.iterator().next();
            DeclaredType elementDeclaredType =
                TypeUtil.toDeclaredType(elementType);
            if (elementDeclaredType == null) {
                throw new ValidationException(
                    MessageCode.SLIM3GEN1016,
                    env,
                    declaration.getPosition(),
                    elementType);
            }
View Full Code Here

TOP

Related Classes of org.slim3.util.RequestMap

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.