public class HubSelectDelegate extends Object
Constructor and Description |
---|
HubSelectDelegate() |
Modifier and Type | Method and Description |
---|---|
protected static int |
_fetchMore(Hub thisHub,
OASelect sel,
int famt) |
protected static boolean |
_refresh(Hub thisHub) |
static boolean |
adoptWhereHub(Hub thisHub,
String propName,
Hub hubFrom)
Check to see if thisHub can use the whereHub and "converted" PP as another Hub.
|
protected static void |
cancelSelect(Hub thisHub,
boolean bRemoveSelect)
Cancels current OASelect, calling select.cancel() This will also set SelectLater to false and RequiredWhere to null.
|
protected static int |
fetchMore(Hub thisHub)
Internal method to retrieve objects from last select()
|
protected static int |
fetchMore(Hub thisHub,
int famt)
Internal method to retrieve objects from last select()
|
protected static int |
fetchMore(Hub thisHub,
OASelect sel) |
protected static int |
fetchMore(Hub thisHub,
OASelect sel,
int famt) |
static int |
getCount(Hub thisHub) |
protected static OASelect |
getSelect(Hub thisHub)
Returns OASelect used for querying datasource.
|
protected static OASelect |
getSelect(Hub thisHub,
boolean bCreateIfNull) |
static String |
getSelectOrder(Hub thisHub)
Sort Order clause to use for select.
|
static String |
getSelectWhere(Hub thisHub) |
static Hub |
getSelectWhereHub(Hub thisHub) |
static String |
getSelectWhereHubPropertyPath(Hub thisHub) |
static boolean |
isCounted(Hub thisHub) |
static boolean |
isMoreData(Hub thisHub)
Find out if more objects are available from last select from OADataSource.
|
static boolean |
isMoreData(OASelect sel) |
static void |
loadAllData(Hub thisHub)
This will automatically read all records from current select().
|
static void |
loadAllData(Hub thisHub,
OASelect select) |
static boolean |
refresh(Hub thisHub) |
static boolean |
refreshSelect(Hub thisHub)
This will re-run the last select.
|
static void |
select(Hub thisHub,
boolean bAppendFlag) |
protected static void |
select(Hub thisHub,
OAObject whereObject,
String whereClause,
Object[] whereParams,
String orderByClause,
boolean bAppendFlag) |
protected static void |
select(Hub thisHub,
OAObject whereObject,
String whereClause,
Object[] whereParams,
String orderByClause,
boolean bAppendFlag,
OAFilter filter) |
static void |
select(Hub thisHub,
OASelect select)
Used to populate Hub with objects returned from a OADataSource select.
|
static void |
selectPassthru(Hub thisHub,
String whereClause,
String orderClause) |
static void |
selectPassthru(Hub thisHub,
String whereClause,
String orderClause,
boolean bAppend) |
static void |
setSelectOrder(Hub thisHub,
String s)
Sort Order clause to use for select.
|
static void |
setSelectWhere(Hub thisHub,
String s)
WHERE clause to use for select.
|
static void |
setSelectWhereHub(Hub thisHub,
Hub hub) |
static void |
setSelectWhereHubPropertyPath(Hub thisHub,
String pp) |
protected static int fetchMore(Hub thisHub)
protected static int fetchMore(Hub thisHub, int famt)
public static boolean isMoreData(Hub thisHub)
public static boolean isMoreData(OASelect sel)
public static void loadAllData(Hub thisHub)
protected static OASelect getSelect(Hub thisHub)
public static void select(Hub thisHub, OASelect select)
protected static void cancelSelect(Hub thisHub, boolean bRemoveSelect)
public static int getCount(Hub thisHub)
public static boolean isCounted(Hub thisHub)
public static void setSelectWhere(Hub thisHub, String s)
public static void setSelectOrder(Hub thisHub, String s)
getSelectOrder(com.viaoa.hub.Hub)
,
OASelect
public static String getSelectOrder(Hub thisHub)
public static void select(Hub thisHub, boolean bAppendFlag)
protected static void select(Hub thisHub, OAObject whereObject, String whereClause, Object[] whereParams, String orderByClause, boolean bAppendFlag)
protected static void select(Hub thisHub, OAObject whereObject, String whereClause, Object[] whereParams, String orderByClause, boolean bAppendFlag, OAFilter filter)
public static void selectPassthru(Hub thisHub, String whereClause, String orderClause)
public static void selectPassthru(Hub thisHub, String whereClause, String orderClause, boolean bAppend)
public static void setSelectWhereHubPropertyPath(Hub thisHub, String pp)
public static boolean adoptWhereHub(Hub thisHub, String propName, Hub hubFrom)
Example setup:
hubWhere<Company>
PP: [Company.]customers.orders.orderItems
reversePP: orderItem.order.customer.company
hubFrom = Hub<OrderItem>, hubWhere+PP=hub<Company>+"customers.orders.orderItems"
a select for hubFrom<OrderItem> would add a whereClause "AND order.customer.company=?", hubWhere<Company>.AO
Which would limit it to only selecting orderitems that are for a company.
Now ... if we have a Hub<Order> that is used to select an Order for an OrderItem, then it would need to only select under the
same Company.
thisHub<Order>
calling adoptWhereHub(thisHub, "order", hubFrom<OrderItem>, where "order" is the property from hubFrom<OrderItem> to
thisHub<Order>
would get hubWhere+PP from hubFrom<Orderitem>, which would be hub<Company>+"customers.orders.orderItems", and would
reverse it to "order.customer.company", where the first link is "order", which matches propName "order", and thisHub<Order>
would end up using hub<Company>+"customers.orders"
thisHub
- Hub that could be in the same propertyPath of the hubFromHub.whereHubPropertyPathpropName
- the link name of thisHub from hubFrom.hubFrom
- hub that might have a selectWhereHub & PP that can be used by thisHub.public static boolean refresh(Hub thisHub)
protected static boolean _refresh(Hub thisHub)
Copyright © 1999–2025 ViaOA. All rights reserved.