{"action":"created","issue":{"url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/issues/131","repository_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client","labels_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/issues/131/comments","events_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/issues/131/events","html_url":"https://github.com/hazelcast/hazelcast-nodejs-client/pull/131","id":166081041,"number":131,"title":"Paging Predicate implementation","user":{"login":"mustafaiman","id":6582349,"avatar_url":"https://avatars.githubusercontent.com/u/6582349?v=3","gravatar_id":"","url":"https://api.github.com/users/mustafaiman","html_url":"https://github.com/mustafaiman","followers_url":"https://api.github.com/users/mustafaiman/followers","following_url":"https://api.github.com/users/mustafaiman/following{/other_user}","gists_url":"https://api.github.com/users/mustafaiman/gists{/gist_id}","starred_url":"https://api.github.com/users/mustafaiman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mustafaiman/subscriptions","organizations_url":"https://api.github.com/users/mustafaiman/orgs","repos_url":"https://api.github.com/users/mustafaiman/repos","events_url":"https://api.github.com/users/mustafaiman/events{/privacy}","received_events_url":"https://api.github.com/users/mustafaiman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/labels/Type:%20Feature","name":"Type: Feature","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-18T12:21:22Z","updated_at":"2016-07-20T09:09:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/pulls/131","html_url":"https://github.com/hazelcast/hazelcast-nodejs-client/pull/131","diff_url":"https://github.com/hazelcast/hazelcast-nodejs-client/pull/131.diff","patch_url":"https://github.com/hazelcast/hazelcast-nodejs-client/pull/131.patch"},"body":"Full PagingPredicate support.\r\nAn IdentifiedDataSerializable or Portable Comparator class should be registered to both Hazelcast server and client in order to test PagingPredicate with custom comparator. Hazelcast Remote Controller does not have this capability for now. Therefore I could not test custom comparator option formally. However I created a code sample for that and I tried the functionality by hand.\r\nIf you want to reproduce the test you can start hazelcast server with following snippet:\r\n```\r\npackage com.hazelcast.client;\r\n\r\nimport com.hazelcast.config.Config;\r\nimport com.hazelcast.config.GroupConfig;\r\nimport com.hazelcast.config.NetworkConfig;\r\nimport com.hazelcast.config.SerializationConfig;\r\nimport com.hazelcast.core.Hazelcast;\r\nimport com.hazelcast.core.HazelcastInstance;\r\nimport com.hazelcast.nio.ObjectDataInput;\r\nimport com.hazelcast.nio.ObjectDataOutput;\r\nimport com.hazelcast.nio.serialization.DataSerializableFactory;\r\nimport com.hazelcast.nio.serialization.IdentifiedDataSerializable;\r\n\r\nimport java.io.IOException;\r\nimport java.util.Comparator;\r\nimport java.util.Map;\r\n\r\n/**\r\n * Created by mustafa on 19/07/16.\r\n */\r\npublic class UT {\r\n    public static void main(String[] args) {\r\n        Config config = new Config();\r\n        SerializationConfig serializationConfig = new SerializationConfig();\r\n        serializationConfig.addDataSerializableFactory(1, new DataSerializableFactory() {\r\n            @Override\r\n            public IdentifiedDataSerializable create(int typeId) {\r\n                return new ReverseComparator();\r\n            }\r\n        });\r\n        config.setSerializationConfig(serializationConfig);\r\n        HazelcastInstance instance = Hazelcast.newHazelcastInstance(config);\r\n\r\n    }\r\n\r\n    public static class ReverseComparator implements Comparator<Map.Entry>, IdentifiedDataSerializable {\r\n\r\n        @Override\r\n        public int getFactoryId() {\r\n            return 1;\r\n        }\r\n\r\n        @Override\r\n        public int getId() {\r\n            return 10;\r\n        }\r\n\r\n        @Override\r\n        public void writeData(ObjectDataOutput out) throws IOException {\r\n\r\n        }\r\n\r\n        @Override\r\n        public void readData(ObjectDataInput in) throws IOException {\r\n\r\n        }\r\n\r\n        @Override\r\n        public int compare(Map.Entry o1, Map.Entry o2) {\r\n            return (((String)o1.getKey()).compareTo(((String)o2.getKey()))) * -1;\r\n        }\r\n    }\r\n}\r\n```\r\nThen you can run `code_samples/paging_predicate.js`. You will see entries are reverse oredered and paged as it should be."},"comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/issues/comments/233894937","html_url":"https://github.com/hazelcast/hazelcast-nodejs-client/pull/131#issuecomment-233894937","issue_url":"https://api.github.com/repos/hazelcast/hazelcast-nodejs-client/issues/131","id":233894937,"user":{"login":"devOpsHazelcast","id":7523732,"avatar_url":"https://avatars.githubusercontent.com/u/7523732?v=3","gravatar_id":"","url":"https://api.github.com/users/devOpsHazelcast","html_url":"https://github.com/devOpsHazelcast","followers_url":"https://api.github.com/users/devOpsHazelcast/followers","following_url":"https://api.github.com/users/devOpsHazelcast/following{/other_user}","gists_url":"https://api.github.com/users/devOpsHazelcast/gists{/gist_id}","starred_url":"https://api.github.com/users/devOpsHazelcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devOpsHazelcast/subscriptions","organizations_url":"https://api.github.com/users/devOpsHazelcast/orgs","repos_url":"https://api.github.com/users/devOpsHazelcast/repos","events_url":"https://api.github.com/users/devOpsHazelcast/events{/privacy}","received_events_url":"https://api.github.com/users/devOpsHazelcast/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T09:09:57Z","updated_at":"2016-07-20T09:09:57Z","body":"Test PASSed.\n"}}
{"actor":{"display_login":"devOpsHazelcast"}}