<commit_before># Realm Field Names Helper

This library auto-generate helper classes that can help make Realm queries more type safe.

For each Realm model class a corresponding `<class>Fields` class is created with static references
to all queryable field names.

## Installation

Just include the following dependency in your `gradle.build` file

```gradle
compile 'dk.ilios:realmfieldnameshelper:1.1.0'
```

This library is compatible with  `Realm 1.1.1` and onwards.

## Usage

The library adds an annotation processor that automatically detects all Realm model classes and
generated an extra class called `<className>Fields`. This class will contain static references
to all field names that can be queried.

```java
// Standard Realm Model class
public class Person extends RealmObject {
    private String name;
    private boolean hasDogs; // camel case naming gets converted to uppercase separated by "_"
    private boolean mHasCats; // Hungarian notation is evil but support for m starting prefix.
    private boolean has_fish; // fields already using "_" are just converted as they are.
    private Dog favoriteDog; // linked fields are generated one link away
    private RealmList<Dog> dogs; // linked fields are generated one link away

    @Ignore
    private int random;

    // Getters and setters ...
}

public class Dog extends RealmObject {<commit_msg>Specify that only apt is needed to use this library<commit_after># Realm Field Names Helper

This library auto-generate helper classes that can help make Realm queries more type safe.

For each Realm model class a corresponding `<class>Fields` class is created with static references
to all queryable field names.

## Installation

Just include the following dependency in your `gradle.build` file

```gradle
apt 'dk.ilios:realmfieldnameshelper:1.1.0'
```

This library is compatible with  `Realm 1.1.1` and onwards.

## Usage

The library adds an annotation processor that automatically detects all Realm model classes and
generated an extra class called `<className>Fields`. This class will contain static references
to all field names that can be queried.

```java
// Standard Realm Model class
public class Person extends RealmObject {
    private String name;
    private boolean hasDogs; // camel case naming gets converted to uppercase separated by "_"
    private boolean mHasCats; // Hungarian notation is evil but support for m starting prefix.
    private boolean has_fish; // fields already using "_" are just converted as they are.
    private Dog favoriteDog; // linked fields are generated one link away
    private RealmList<Dog> dogs; // linked fields are generated one link away

    @Ignore
    private int random;

    // Getters and setters ...
}

public class Dog extends RealmObject {
{'fraction_non_alphanumeric': 0.05827338129496403, 'fraction_numerical': 0.004316546762589928, 'mean_word_length': 4.01985559566787, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '156203', 'n_tokens_mistral': 715, 'n_tokens_neox': 680, 'n_words': 363}