lbnet
protocolWe will specify our own network protocol using the java tecnologies, so we need our own kind of URLs. Here is the URL sintax and some examples:
a) jLaBase Common Query URL:
Protocol User Login Server Connection Entity Location Querylbnet
://
username
:
password
@
server.domain
:
port
/
datastore
/
entity or relation
?
query filter
Query Filter Sintax (without blanks):
<? fieldName1="value1" [; op="< | <= | = | => | > | ! | method"]> [& ... [& fieldNameN="valueN" ...]]
Parameters Description:
- fieldName: Name of the field which will be filtered.
- value: Filter value, it musts match the field type.
- op: Optional. Compare operation, if omitted the servlet will compare using the default compare operation defined for that field type.
<
: Lesser than.<=
: Lesser than or equal to.=
: Equal to.=>
: Greater than or equal to.>
: Greater than.!
: Not equal to.method
: Method name of the field type that will be used for comparisons.b) jLaBase Detail Query URL:
Protocol User Login Server Connection Entity Location Detaillbnet
://
username
:
password
@
server.domain
:
port
/
datastore
/
entity or relation
#
detail filter
Detail Filter Sintax (without blanks):
<# detail = "detailName" ; value="filterValue" [; op="< | <= | = | => | > | ! | method:args"]> [& ...]
Parameters Description:
- detail: Detail Name Identificator (lbDNI).
- value: Detail Filter Value (lbDVF).
- op: Optional. Compare operation, if omitted the servlet will compare using the default compare operation defined for that field type.
<
: Lesser than.<=
: Lesser than or equal to.=
: Equal to.=>
: Greater than or equal to.>
: Greater than.!
: Not equal to.method
: Method name of the field type that will be used for comparisons.Predefined Methods:
- like:
- Method Type:
String
. Used when we want to do a search specifing a format string. Parameters:
- a: Acepts only one low character.
- aa: Acepts many low characters.
- A: Acepts only one high character.
- AA: Acepts many high characters.
- aA/Aa: Acepts many caracters without case.
- #: Acepts only one number.
- ##: Acepts many numbers.
- ?: Acepts once whatever character.
- *: Acepts whatever character many times.
Examples:
lbnet://lbnet.company.com/country/article
lbnet://john03:mypass@company.net/borrow?cathegory="book"
(*)lbnet://root:pass@srv.company.org:4342/employee?salary="1000";op=">="&department="design";op="like:Aa"
(*)
(1 - Common Query URL):
This URL represents an anonymous connection to the main server of "company.com" through the default port using thelbnet
protocol. It locates the entity "article" under the "country" context. The server response will be aResultSet
containing all records contained int the entity "article".
(2 - Detail Query URL):
This URL represents an user connection to the main server of "company.net" through the default port using thelbnet
protocol. The username is "john03" and the password is "mypass". It locates the relation "borrow" filtering the field name "cathegory" with the value "book" using de default compare operation defined for that field type. The server response is aResultSet
containing all records of that relation with that field value and solely for that user.
(3 - Both):
This URL represents an admin connection to the data environment "srv" relative to domain "company.org" through the port #4342 using thelbnet
protocol. It locates the entity "employee" filtering two fields: The first one is a detail field named "department" that will be compared with the detail value "design" using the default compare operation defined for that field type; the second field is named "salary" that will be compared by the value "1000" using the operation ">=" (greater or equal to ...). The server response will be aResultSet
containing all records stored in the entity "employee" that are suitable to the query string.