Package org.slim3.datastore.model

Examples of org.slim3.datastore.model.Aaa


        }
        if (!ClassConstants.Key.equals(attributeMetaDesc
            .getDataType()
            .getClassName())) {
            if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
                throw new ValidationException(
                    MessageCode.SLIM3GEN1007,
                    env,
                    fieldDeclaration.getPosition());
            }
            throw new ValidationException(
                MessageCode.SLIM3GEN1029,
                env,
                classDeclaration.getPosition(),
                fieldDeclaration.getSimpleName(),
                fieldDeclaration.getDeclaringType().getQualifiedName());
View Full Code Here


        }
        String className = attributeMetaDesc.getDataType().getClassName();
        if (!ClassConstants.Long.equals(className)
            && !ClassConstants.primitive_long.equals(className)) {
            if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
                throw new ValidationException(
                    MessageCode.SLIM3GEN1008,
                    env,
                    fieldDeclaration.getPosition());
            }
            throw new ValidationException(
                MessageCode.SLIM3GEN1030,
                env,
                classDeclaration.getPosition(),
                fieldDeclaration.getSimpleName(),
                fieldDeclaration.getDeclaringType().getQualifiedName());
View Full Code Here

                fieldDeclaration,
                attribute);
        }
        if (dataType instanceof ModelRefType) {
            if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
                throw new ValidationException(
                    MessageCode.SLIM3GEN1009,
                    env,
                    fieldDeclaration.getPosition());
            }
            throw new ValidationException(
                MessageCode.SLIM3GEN1028,
                env,
                classDeclaration.getPosition(),
                fieldDeclaration.getSimpleName(),
                fieldDeclaration.getDeclaringType().getQualifiedName());
View Full Code Here

                AnnotationConstants.cipher,
                AnnotationConstants.persistent + " = false");
        }
        String type = attributeMetaDesc.getDataType().getTypeName();
        if (!type.equals(ClassConstants.String) && !type.equals(ClassConstants.Text)) {
            throw new ValidationException(
                MessageCode.SLIM3GEN1053,
                env,
                attribute.getPosition());
        }
        attributeMetaDesc.setCipher(true);
View Full Code Here

        TypeMirror mirror = (TypeMirror)value.getValue();
        if(mirror == null){
            return className;
        }
        if (value instanceof InterfaceType) {
            throw new ValidationException(
                MessageCode.SLIM3GEN1055,
                env,
                declaration.getPosition());
        }
        ClassType coderClassType = TypeUtil.toClassType(mirror);
        if(coderClassType == null) return className;
        ClassDeclaration coderClassDeclaration =
            coderClassType.getDeclaration();
        if (coderClassDeclaration == null) {
            throw new UnknownDeclarationException(
                env,
                coderClassDeclaration,
                coderClassType);
        }
        className = coderClassDeclaration.getQualifiedName();
        if (!DeclarationUtil
                .hasPublicDefaultConstructor(coderClassDeclaration)) {
                throw new ValidationException(
                    MessageCode.SLIM3GEN1054,
                    env,
                    declaration.getPosition(),
                    className);
        }
View Full Code Here

    static {
        initialize();
    }

    private static void initialize() {
        Cleaner.add(new Cleanable() {
            public void clean() {
                modelMetaCache.clear();
                initialized = false;
            }
        });
View Full Code Here

    static {
        initialize();
    }

    private static void initialize() {
        Cleaner.add(new Cleanable() {
            public void clean() {
                modelMetaCache.clear();
                initialized = false;
            }
        });
View Full Code Here

    private TwitterService service = new TwitterService();
    private TweetMeta meta = TweetMeta.get();

    @Override
    public Navigation run() throws Exception {
        RequestMap requestMap = new RequestMap(request);
//        int index = Integer.parseInt(requestMap.get("index").toString());
//        String content = requestMap.get("content").toString();
//        List<Tweet> listTween = service.getTweetList();
//        int maxIndex = listTween.size();
//        if (index < maxIndex) {
//            service.updateTweet(listTween.get(index).getKey(), content);
//            listTween = service.getTweetList();
//            requestScope("tweetList", listTween);
//        }
        if (validate() && (!requestMap.get("content").toString().trim().equals(""))) {
            service.updateTweet(asKey(meta.key), asLong(meta.version), requestMap);
        } else {
            return forward ("edit.jsp");
        }
        return redirect(basePath);
View Full Code Here

    private TwitterService service = new TwitterService();
    private TweetMeta meta = TweetMeta.get();

    @Override
    public Navigation run() throws Exception {
        RequestMap requestMap = new RequestMap(request);
        if (validate() && (!requestMap.get("content").toString().trim().equals(""))) {
            service.tweet(requestMap);
        }
        return redirect(basePath);
    }
View Full Code Here

                encoding = "UTF-8";
            }
            try {
                return URLEncoder.encode(path, encoding);
            } catch (UnsupportedEncodingException e) {
                throw new WrapRuntimeException(e);
            }
        }
View Full Code Here

TOP

Related Classes of org.slim3.datastore.model.Aaa

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.