Skip to content

Commit 23d2f50

Browse files
Docs: upper-case ObjectBox names, update and expand some.
1 parent 98d98b4 commit 23d2f50

File tree

12 files changed

+37
-31
lines changed

12 files changed

+37
-31
lines changed

objectbox-java-api/src/main/java/io/objectbox/annotation/BaseEntity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
import java.lang.annotation.Target;
77

88
/**
9-
* Annotation for an entity base class.
10-
* ObjectBox will include properties of an entity super class marked with this annotation.
9+
* Marks a class as an ObjectBox Entity super class.
10+
* ObjectBox will store properties of this class as part of an Entity that inherits from this class.
11+
* See <a href="https://docs.objectbox.io/advanced/entity-inheritance">the Entity Inheritance documentation</a> for details.
1112
*/
1213
@Retention(RetentionPolicy.CLASS)
1314
@Target(ElementType.TYPE)

objectbox-java-api/src/main/java/io/objectbox/annotation/Convert.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,29 @@
1616

1717
package io.objectbox.annotation;
1818

19-
import io.objectbox.converter.PropertyConverter;
20-
2119
import java.lang.annotation.ElementType;
2220
import java.lang.annotation.Retention;
2321
import java.lang.annotation.RetentionPolicy;
2422
import java.lang.annotation.Target;
2523

24+
import io.objectbox.converter.PropertyConverter;
25+
2626
/**
27-
* Specifies {@link PropertyConverter} for the field to support custom types
27+
* Supplies a {@link PropertyConverter converter} to store custom Property types as a supported {@link #dbType()}.
28+
* See the <a href="https://docs.objectbox.io/advanced/custom-types">Custom Types documentation</a> for details.
2829
*/
2930
@Retention(RetentionPolicy.CLASS)
3031
@Target(ElementType.FIELD)
3132
public @interface Convert {
32-
/** Converter class */
33+
/**
34+
* The converter class that ObjectBox should use. See {@link PropertyConverter} for implementation guidelines.
35+
*/
3336
Class<? extends PropertyConverter> converter();
3437

3538
/**
36-
* Class of the DB type the Java property is converted to/from.
37-
* This is limited to all java classes which are supported natively by ObjectBox.
39+
* The Property type the Java field value is converted to/from.
40+
* See the <a href="https://docs.objectbox.io/advanced/custom-types">Custom Types documentation</a> for a list
41+
* of supported types.
3842
*/
3943
Class dbType();
4044
}

objectbox-java-api/src/main/java/io/objectbox/annotation/Entity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import java.lang.annotation.Target;
2323

2424
/**
25-
* Annotation for entities
26-
* ObjectBox only persist objects of classes which are marked with this annotation
25+
* Marks a class as an ObjectBox Entity.
26+
* Allows to obtain a Box for this Entity from BoxStore to persist Objects of this class.
2727
*/
2828
@Retention(RetentionPolicy.CLASS)
2929
@Target(ElementType.TYPE)

objectbox-java-api/src/main/java/io/objectbox/annotation/package-info.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
/**
1818
* Annotations to mark a class as an {@link io.objectbox.annotation.Entity @Entity},
19-
* to specify the {@link io.objectbox.annotation.Id @Id} property,
19+
* to specify the {@link io.objectbox.annotation.Id @Id} Property,
2020
* to create an {@link io.objectbox.annotation.Index @Index} or
21-
* a {@link io.objectbox.annotation.Transient @Transient} property.
21+
* a {@link io.objectbox.annotation.Transient @Transient} Property.
2222
* <p>
2323
* For more details look at the documentation of individual classes and
2424
* <a href="https://docs.objectbox.io/entity-annotations">docs.objectbox.io/entity-annotations</a>.

objectbox-java-api/src/main/java/io/objectbox/converter/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/**
1818
* For use with {@link io.objectbox.annotation.Convert @Convert}: {@link io.objectbox.converter.PropertyConverter}
19-
* to convert custom property types.
19+
* to convert custom Property types.
2020
* <p>
2121
* For more details look at the documentation of individual classes and
2222
* <a href="https://docs.objectbox.io/advanced/custom-types">docs.objectbox.io/advanced/custom-types</a>.

objectbox-java/src/main/java/io/objectbox/Box.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
import io.objectbox.relation.RelationInfo;
4040

4141
/**
42-
* A box to store objects of a particular class.
42+
* A Box to put and get Objects of a specific Entity class.
4343
* <p>
4444
* Thread-safe.
4545
*/

objectbox-java/src/main/java/io/objectbox/BoxStore.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
import io.objectbox.reactive.SubscriptionBuilder;
5454

5555
/**
56-
* Represents an ObjectBox database and gives you {@link Box}es to get and put Objects of a specific type
57-
* (see {@link #boxFor(Class)}).
56+
* An ObjectBox database that provides {@link Box Boxes} to put and get Objects of a specific Entity class
57+
* (see {@link #boxFor(Class)}). To get an instance of this class use {@code MyObjectBox.builder()}.
5858
*/
5959
@SuppressWarnings({"unused", "UnusedReturnValue", "SameParameterValue", "WeakerAccess"})
6060
@ThreadSafe

objectbox-java/src/main/java/io/objectbox/BoxStoreBuilder.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package io.objectbox;
1818

1919
import com.google.flatbuffers.FlatBufferBuilder;
20-
import io.objectbox.model.FlatStoreOptions;
20+
2121
import org.greenrobot.essentials.io.IoUtils;
2222

2323
import java.io.BufferedInputStream;
@@ -39,21 +39,20 @@
3939
import io.objectbox.annotation.apihint.Internal;
4040
import io.objectbox.exception.DbException;
4141
import io.objectbox.ideasonly.ModelUpdate;
42+
import io.objectbox.model.FlatStoreOptions;
4243
import io.objectbox.model.ValidateOnOpenMode;
4344

4445
/**
45-
* Builds a {@link BoxStore} with optional configurations. The class is not initiated directly; use
46-
* MyObjectBox.builder() to get an instance.
46+
* Configures and builds a {@link BoxStore} with reasonable defaults. To get an instance use {@code MyObjectBox.builder()}.
4747
* <p>
48-
* Each configuration has reasonable defaults, which you can adjust.
49-
* For Android, you must pass a Context using {@link #androidContext(Object)}.
48+
* On Android, make sure to provide a Context to {@link #androidContext(Object) androidContext(context)}.
5049
* <p>
51-
* Configurations you can override:
50+
* Some common defaults to override are:
5251
* <ol>
53-
* <li>Name/location of DB: use {@link #name(String)}/{@link #baseDirectory}/{@link #androidContext(Object)}
54-
* OR {@link #directory(File)}(default: name "objectbox)</li>
55-
* <li>Max DB size: see {@link #maxSizeInKByte} (default: 1 GB)</li>
56-
* <li>Max readers: see {@link #maxReaders(int)} (default: 126)</li>
52+
* <li>Name/location of Store: use either {@link #name(String)}, {@link #baseDirectory(File)},
53+
* {@link #androidContext(Object)} or {@link #directory(File)} (default: name "objectbox),</li>
54+
* <li>Max DB size: see {@link #maxSizeInKByte(long)} (default: 1024 * 1024 KB = 1 GB),</li>
55+
* <li>Max readers: see {@link #maxReaders(int)} (default: 126),</li>
5756
* </ol>
5857
*/
5958
public class BoxStoreBuilder {

objectbox-java/src/main/java/io/objectbox/Property.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
import io.objectbox.query.QueryCondition.PropertyCondition.Operation;
3030

3131
/**
32-
* Meta data describing a property of an ObjectBox entity.
33-
* Properties are typically used to define query criteria using {@link io.objectbox.query.QueryBuilder}.
32+
* Meta data describing a Property of an ObjectBox Entity.
33+
* Properties are typically used when defining {@link io.objectbox.query.Query Query} conditions
34+
* using {@link io.objectbox.query.QueryBuilder QueryBuilder}.
35+
* Access properties using the generated underscore class of an entity (e.g. {@code Example_.id}).
3436
*/
3537
@SuppressWarnings("WeakerAccess,UnusedReturnValue, unused")
3638
public class Property<ENTITY> implements Serializable {

objectbox-java/src/main/java/io/objectbox/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* <li>MyObjectBox: Generated by the Gradle plugin, supplies a {@link io.objectbox.BoxStoreBuilder}
2323
* to build a BoxStore for your app.</li>
2424
* <li>{@link io.objectbox.BoxStore}: The database interface, allows to manage Boxes.</li>
25-
* <li>{@link io.objectbox.Box}: Persists and queries for entities, there is one for each entity.</li>
25+
* <li>{@link io.objectbox.Box}: Persists and queries for Objects, there is one for each Entity class.</li>
2626
* </ul>
2727
* <p>
2828
* For more details look at the documentation of individual classes and

0 commit comments

Comments
 (0)