@@ -0,0 +1,2447 @@
+//========================================================================%0A//Copyright 2017 David Yu%0A//------------------------------------------------------------------------%0A//Licensed under the Apache License, Version 2.0 (the %22License%22);%0A//you may not use this file except in compliance with the License.%0A//You may obtain a copy of the License at %0A//http://www.apache.org/licenses/LICENSE-2.0%0A//Unless required by applicable law or agreed to in writing, software%0A//distributed under the License is distributed on an %22AS IS%22 BASIS,%0A//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A//See the License for the specific language governing permissions and%0A//limitations under the License.%0A//========================================================================%0A%0Apackage comments.user;%0A%0Aimport com.dyuproject.protostuff.Pipe;%0Aimport com.dyuproject.protostuff.RpcHeader;%0Aimport com.dyuproject.protostuff.RpcResponse;%0Aimport com.dyuproject.protostuff.ds.ParamRangeKey;%0Aimport com.dyuproject.protostuffdb.Datastore;%0Aimport com.dyuproject.protostuffdb.RangeV;%0Aimport com.dyuproject.protostuffdb.Visit;%0Aimport com.dyuproject.protostuffdb.Visitor;%0Aimport com.dyuproject.protostuffdb.WriteContext;%0A%0A/**%0A * TODO%0A * %0A * @author David Yu%0A * @created May 1, 2017%0A */%0Apublic final class CommentViews%0A%7B%0A    private CommentViews() %7B%7D%0A    %0A    private static final ParamRangeKey ASC = new ParamRangeKey(false);%0A    static%0A    %7B%0A        ASC.limit = -1;%0A    %7D%0A    %0A    static %3CV%3E boolean visitByPostId(long postId, %0A            Datastore store, WriteContext context, %0A            Visitor%3CV%3E visitor, V param)%0A    %7B%0A        return visitByPostId(postId, store, context, RangeV.Store.V, visitor, param);%0A    %7D%0A    %0A    static %3CV%3E boolean visitByPostId(long postId, %0A            Datastore store, WriteContext context, %0A            RangeV.Store visitorType, %0A            Visitor%3CV%3E visitor, V param)%0A    %7B%0A        return Visit.by8(Comment.IDX_POST_ID__KEY_CHAIN, postId,%0A                Comment.EM, comments.user.Comment.PList.FN_P, ASC,%0A                RangeV.Store.V, store, context,%0A                visitor, param);%0A    %7D%0A%0A    static boolean listByPostId(ParamLong req, Datastore store, RpcResponse res,%0A            Pipe.Schema%3CComment.PList%3E resPipeSchema, RpcHeader header)%0A    %7B%0A        return visitByPostId(req.p,%0A                store, res.context,%0A                RangeV.Store.ENTITY_PV,%0A                RangeV.RES_PV, res);%0A    %7D%0A%0A%7D%0A

comment views