{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/1443","labels_url":"https://api.github.com/repos/realm/realm-java/issues/1443/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/1443/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/1443/events","html_url":"https://github.com/realm/realm-java/pull/1443","id":104257357,"number":1443,"title":"Replace constants with enums","user":{"login":"cmelchior","id":406066,"avatar_url":"https://avatars.githubusercontent.com/u/406066?v=3","gravatar_id":"","url":"https://api.github.com/users/cmelchior","html_url":"https://github.com/cmelchior","followers_url":"https://api.github.com/users/cmelchior/followers","following_url":"https://api.github.com/users/cmelchior/following{/other_user}","gists_url":"https://api.github.com/users/cmelchior/gists{/gist_id}","starred_url":"https://api.github.com/users/cmelchior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmelchior/subscriptions","organizations_url":"https://api.github.com/users/cmelchior/orgs","repos_url":"https://api.github.com/users/cmelchior/repos","events_url":"https://api.github.com/users/cmelchior/events{/privacy}","received_events_url":"https://api.github.com/users/cmelchior/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/realm/realm-java/labels/Review","name":"Review","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-01T12:43:25Z","updated_at":"2015-09-01T14:23:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/realm/realm-java/pulls/1443","html_url":"https://github.com/realm/realm-java/pull/1443","diff_url":"https://github.com/realm/realm-java/pull/1443.diff","patch_url":"https://github.com/realm/realm-java/pull/1443.patch"},"body":"This PR replaces the `RealmQuery.CASE_*` and `ReamResults.SORT_ORDER_*` constants with enum classes instead. They are placed in the `io.realm.query` package to keep the main namespace as free of new classes as possible. Names are kept deliberate short.\r\n\r\nQuestion: Is naming OK?\r\n\r\n`SortOrder` is already used by the Java framework and  might be more appropriate name, although a bit longer? (http://docs.oracle.com/javase/7/docs/api/javax/swing/SortOrder.html)\r\n\r\nCouldn't find any examples of Case. Closest is probably `FieldNamingPolicy` from GSON (https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/FieldNamingPolicy.html) which however is something slightly different.  `Pattern` also has a flag called  CASE_INSENSITIVE (http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html)\r\n\r\n```\r\nCase.INSENSITIVE\r\nCase.SENSITIVE\r\nSort.ASCENDING\r\nSort.DESCENDING\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/realm/realm-java/issues/comments/136738353","html_url":"https://github.com/realm/realm-java/pull/1443#issuecomment-136738353","issue_url":"https://api.github.com/repos/realm/realm-java/issues/1443","id":136738353,"user":{"login":"cmelchior","id":406066,"avatar_url":"https://avatars.githubusercontent.com/u/406066?v=3","gravatar_id":"","url":"https://api.github.com/users/cmelchior","html_url":"https://github.com/cmelchior","followers_url":"https://api.github.com/users/cmelchior/followers","following_url":"https://api.github.com/users/cmelchior/following{/other_user}","gists_url":"https://api.github.com/users/cmelchior/gists{/gist_id}","starred_url":"https://api.github.com/users/cmelchior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmelchior/subscriptions","organizations_url":"https://api.github.com/users/cmelchior/orgs","repos_url":"https://api.github.com/users/cmelchior/repos","events_url":"https://api.github.com/users/cmelchior/events{/privacy}","received_events_url":"https://api.github.com/users/cmelchior/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T14:23:19Z","updated_at":"2015-09-01T14:23:19Z","body":"@emanuelez To keep `io.realm` as clean as possible. I kinda like that it only contain the high level classes that define the API (RealmBaseAdapter is moving to `io.realm.android`)\r\n"}}