Package org.slim3.datastore.model

Examples of org.slim3.datastore.model.Bbb


                AnnotationConstants.listener);
        if (listener == null) {
            return;
        }
        if (listener instanceof InterfaceType) {
            throw new ValidationException(
                MessageCode.SLIM3GEN1052,
                env,
                classDeclaration.getPosition());
        }
        ClassType listenerClassType =
            TypeUtil.toClassType((TypeMirror) listener);
        if (listenerClassType == null) {
            return;
        }
        ClassDeclaration listenerClassDeclaration =
            listenerClassType.getDeclaration();
        if (listenerClassDeclaration == null) {
            throw new UnknownDeclarationException(
                env,
                listenerClassDeclaration,
                listenerClassType);
        }
        if (!DeclarationUtil
            .hasPublicDefaultConstructor(listenerClassDeclaration)) {
                throw new ValidationException(
                    MessageCode.SLIM3GEN1050,
                    env,
                    classDeclaration.getPosition(),
                    listenerClassDeclaration.getQualifiedName());
        }
View Full Code Here


    protected void validatePrimaryKeyUniqueness(
            AttributeMetaDesc attributeMetaDesc,
            ClassDeclaration classDeclaration, ModelMetaDesc modelMetaDesc) {
        if (attributeMetaDesc.isPrimaryKey()
            && modelMetaDesc.getKeyAttributeMetaDesc() != null) {
            throw new ValidationException(
                MessageCode.SLIM3GEN1013,
                env,
                classDeclaration.getPosition());
        }
    }
View Full Code Here

    protected void validateVersionUniqueness(
            AttributeMetaDesc attributeMetaDesc,
            ClassDeclaration classDeclaration, ModelMetaDesc modelMetaDesc) {
        if (attributeMetaDesc.isVersion()
            && modelMetaDesc.getVersionAttributeMetaDesc() != null) {
            throw new ValidationException(
                MessageCode.SLIM3GEN1014,
                env,
                classDeclaration.getPosition());
        }
    }
View Full Code Here

            AttributeMetaDesc attributeMetaDesc,
            ClassDeclaration classDeclaration, FieldDeclaration fieldDeclaration) {
        String propertyName = attributeMetaDesc.getName();
        if (propertyNames.contains(propertyName)) {
            if (classDeclaration.equals(fieldDeclaration.getDeclaringType())) {
                throw new ValidationException(
                    MessageCode.SLIM3GEN1047,
                    env,
                    fieldDeclaration.getPosition(),
                    propertyName);
            }
            throw new ValidationException(
                MessageCode.SLIM3GEN1048,
                env,
                classDeclaration.getPosition(),
                propertyName,
                fieldDeclaration.getSimpleName(),
View Full Code Here

        if (attributeMetaDesc.getDataType() instanceof PrimitiveBooleanType) {
            String attributeName = attributeMetaDesc.getAttributeName();
            if (booleanAttributeNames.contains(attributeName)) {
                if (classDeclaration
                    .equals(fieldDeclaration.getDeclaringType())) {
                    throw new ValidationException(
                        MessageCode.SLIM3GEN1043,
                        env,
                        fieldDeclaration.getPosition(),
                        fieldDeclaration.getSimpleName());
                }
                throw new ValidationException(
                    MessageCode.SLIM3GEN1044,
                    env,
                    classDeclaration.getPosition(),
                    fieldDeclaration.getSimpleName(),
                    fieldDeclaration.getDeclaringType().getQualifiedName());
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.Bbb

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.