| Package | Description |
|---|---|
| com.codename1.io.rest |
Simplified REST API
|
| com.codename1.properties |
High level property objects that allow us to replace getters/setters in business objects with more convenient
storage/parsing mappings while retaining type safety.
|
| Modifier and Type | Method and Description |
|---|---|
Response<PropertyBusinessObject> |
RequestBuilder.getAsProperties(Class type)
Executes the request synchronously
|
Response<List<PropertyBusinessObject>> |
RequestBuilder.getAsPropertyList(Class type)
Executes the request synchronously
|
Response<List<PropertyBusinessObject>> |
RequestBuilder.getAsPropertyList(Class type,
String root)
Executes the request synchronously
|
| Modifier and Type | Method and Description |
|---|---|
RequestBuilder |
RequestBuilder.body(PropertyBusinessObject body)
Sets the request body to the JSON matching the given object
|
| Modifier and Type | Method and Description |
|---|---|
ConnectionRequest |
RequestBuilder.fetchAsProperties(OnComplete<Response<PropertyBusinessObject>> callback,
Class type)
Executes the request asynchronously and writes the response to the provided
Callback.
|
ConnectionRequest |
RequestBuilder.fetchAsPropertyList(OnComplete<Response<List<PropertyBusinessObject>>> callback,
Class type)
Executes the request asynchronously and writes the response to the provided
Callback.
|
ConnectionRequest |
RequestBuilder.fetchAsPropertyList(OnComplete<Response<List<PropertyBusinessObject>>> callback,
Class type,
String root)
Executes the request asynchronously and writes the response to the provided
Callback.
|
RequestBuilder |
RequestBuilder.onErrorCode(ErrorCodeHandler<PropertyBusinessObject> err,
Class errorClass)
In case of an error this method is invoked asynchronously to process
the error content with the JSON data and places it into a business
object in the callback
|
| Modifier and Type | Method and Description |
|---|---|
<X extends PropertyBusinessObject> |
PropertyIndex.loadJSONList(InputStream stream)
Loads JSON containing a list of property objects of this type
|
<X extends PropertyBusinessObject> |
PropertyIndex.loadJSONList(String name)
Loads JSON containing a list of property objects of this type
|
| Modifier and Type | Method and Description |
|---|---|
PropertyBusinessObject |
PropertyIndex.newInstance()
Creates a new instance of the parent class
|
| Modifier and Type | Method and Description |
|---|---|
List<PropertyBusinessObject> |
SQLMap.SelectBuilder.build(PropertyBusinessObject obj,
int maxElements,
int page) |
List<PropertyBusinessObject> |
SQLMap.select(PropertyBusinessObject cmp,
Property orderBy,
boolean ascending,
int maxElements,
int page)
Fetches the components from the database matching the given cmp description, the fields that aren't
null within the cmp will match the where clause
|
List<PropertyBusinessObject> |
SQLMap.selectNot(PropertyBusinessObject cmp,
Property orderBy,
boolean ascending,
int maxElements,
int page)
Fetches the components from the database matching the given cmp description, the fields that aren't
null within the cmp will NOT match the where clause
|
| Modifier and Type | Method and Description |
|---|---|
void |
UiBinding.BoundTableModel.addRow(int index,
PropertyBusinessObject b)
Adds a new business object to the table
|
UiBinding.Binding |
UiBinding.bind(PropertyBusinessObject obj,
Container cnt)
Binds a hierarchy of Components to a business object by searching the tree and collecting
the bindings.
|
List<PropertyBusinessObject> |
SQLMap.SelectBuilder.build(PropertyBusinessObject obj,
int maxElements,
int page) |
static PreferencesObject |
PreferencesObject.create(PropertyBusinessObject bo)
Creates a binding object, this method doesn't do anything until bind is invoked
|
Container |
InstantUI.createEditUI(PropertyBusinessObject bo,
boolean autoCommit)
Creates editing UI for the given business object
|
boolean |
SQLMap.createTable(PropertyBusinessObject cmp)
Creates a table matching the given property component if one doesn't exist yet
|
UiBinding.BoundTableModel |
UiBinding.createTableModel(CollectionProperty<? extends PropertyBusinessObject,? extends Object> objects,
PropertyBusinessObject prototype)
Creates a table model which is implicitly bound to the properties
|
UiBinding.BoundTableModel |
UiBinding.createTableModel(List<? extends PropertyBusinessObject> objects,
PropertyBusinessObject prototype)
Creates a table model which is implicitly bound to the properties
|
void |
SQLMap.delete(PropertyBusinessObject cmp)
Deletes a table row matching the component
|
void |
SQLMap.dropTable(PropertyBusinessObject cmp)
Drop a table matching the given property component
|
String |
SQLMap.getTableName(PropertyBusinessObject cmp)
By default the table name matches the property index name unless explicitly modified with this method
|
void |
SQLMap.insert(PropertyBusinessObject cmp)
Adds a new business object into the database
|
List<PropertyBusinessObject> |
SQLMap.select(PropertyBusinessObject cmp,
Property orderBy,
boolean ascending,
int maxElements,
int page)
Fetches the components from the database matching the given cmp description, the fields that aren't
null within the cmp will match the where clause
|
List<PropertyBusinessObject> |
SQLMap.selectNot(PropertyBusinessObject cmp,
Property orderBy,
boolean ascending,
int maxElements,
int page)
Fetches the components from the database matching the given cmp description, the fields that aren't
null within the cmp will NOT match the where clause
|
void |
SQLMap.setPrimaryKey(PropertyBusinessObject cmp,
Property pk)
Sets the primary key for the component
|
void |
SQLMap.setPrimaryKeyAutoIncrement(PropertyBusinessObject cmp,
Property pk)
Sets the primary key for the component and makes it auto-increment
|
void |
SQLMap.setTableName(PropertyBusinessObject cmp,
String name)
By default the table name matches the property index name unless explicitly modified with this method
|
static void |
UiBinding.unbind(PropertyBusinessObject po)
Unbinds all the properties within the business object
|
void |
SQLMap.update(PropertyBusinessObject cmp)
The equivalent of an SQL update assumes that the object is already in the database
|
| Modifier and Type | Method and Description |
|---|---|
UiBinding.BoundTableModel |
UiBinding.createTableModel(CollectionProperty<? extends PropertyBusinessObject,? extends Object> objects,
PropertyBusinessObject prototype)
Creates a table model which is implicitly bound to the properties
|
UiBinding.BoundTableModel |
UiBinding.createTableModel(List<? extends PropertyBusinessObject> objects,
PropertyBusinessObject prototype)
Creates a table model which is implicitly bound to the properties
|
void |
PropertyIndex.populateFromMap(Map<String,Object> m,
Class<? extends PropertyBusinessObject> recursiveType)
This is useful for JSON parsing, it allows converting JSON map data to objects
|
static void |
PropertyIndex.storeJSONList(String name,
List<? extends PropertyBusinessObject> objs)
Writes the JSON string to storage, it's a shortcut for writing/generating the JSON
|
static String |
PropertyIndex.toJSONList(List<? extends PropertyBusinessObject> objs)
Creates a JSON string, containing the list of property business objects
|
| Constructor and Description |
|---|
BoundTableModel(CollectionProperty objectProperty,
PropertyBusinessObject prototype)
Creates a table model with the business objects
|
BoundTableModel(List<? extends PropertyBusinessObject> objects,
PropertyBusinessObject prototype)
Creates a table model with the business objects
|
PropertyIndex(PropertyBusinessObject parent,
String name,
PropertyBase... properties)
The constructor is essential for a proper property business object
|
| Constructor and Description |
|---|
BoundTableModel(List<? extends PropertyBusinessObject> objects,
PropertyBusinessObject prototype)
Creates a table model with the business objects
|
Copyright © 2023. All rights reserved.