Method and system for typesafe attribute matching
First Claim
1. A computer program product comprising a computer readable medium having computer readable code embodied therein for processing data in a database including a plurality of entries, each entry being defined by an entry class type and including a plurality of typed fields, the product comprising:
- means for providing a template having a template class type, the template defining a set of attributes;
means for determining whether the entry class type of one of the plurality of entries and the template class type match;
means for comparing the attributes of the template with corresponding fields of the one entry to determine whether the template matches the one entry when it is determined that the entry class type of the one entry and the template class type match; and
means for identifying that the one entry is a matching entry when it is determined that the template matches the one entry.
2 Assignments
0 Petitions
Accused Products
Abstract
A database system wherein one or more entry databases store a plurality of entries. Each entry is of a given type that defines the fields of the entry. Each field contains or identifies an object with associated attributes or data. The type of each entry may further define behavior in the form of methods the entry can implement. An entry type which is a subtype of another inherits all fields and behavior of its super-type, and contains additional fields and/or defines new/modified behavior. Entries may be expressed in a Java™ programming language. The database system may further employ a search engine which allows queries to be made upon entries in the database. In one implementation, the queries include a read operation, a take operation, and a notify operation. Each query request includes a command indicating the type of operation, and a template which is an entry object having some or all of its fields set to specific values that must be matched exactly. Other fields of the template entry may be specified as wildcards, whose values do not matter. The search engine may further be configured to create an index for caching entries having characteristics which are commonly specified by queries. In one implementation, the databases may also store and perform operations on sets of entries. Additionally, associating attributes to the fields of entries allows the system to achieve type-safe attribute matching.
151 Citations
14 Claims
-
1. A computer program product comprising a computer readable medium having computer readable code embodied therein for processing data in a database including a plurality of entries, each entry being defined by an entry class type and including a plurality of typed fields, the product comprising:
-
means for providing a template having a template class type, the template defining a set of attributes;
means for determining whether the entry class type of one of the plurality of entries and the template class type match;
means for comparing the attributes of the template with corresponding fields of the one entry to determine whether the template matches the one entry when it is determined that the entry class type of the one entry and the template class type match; and
means for identifying that the one entry is a matching entry when it is determined that the template matches the one entry.
-
-
2. A computer program product comprising a computer readable medium having computer readable code embodied therein for processing data in a database including a plurality of entries, each entry being defined by an entry class type and including a plurality of typed fields, by:
-
providing a template having a template class type, the template defining a set of attributes;
determining whether the entry class type of one of the plurality of entries and the template class type match;
comparing the attributes of the template with corresponding fields of the one entry to determine whether the template matches the one entry when it is determined that the entry class type of the one entry and the template class type match; and
identifying that the one entry is a matching entry when it is determined that the template matches the one entry. - View Dependent Claims (3, 4)
comparing only those entries of the same class type as, or a supertype of, the template.
-
-
4. The product of claim 2, further including:
modifying the database in response to the identification of the matching entry.
-
5. A data processing apparatus for type-safe attribute matching in a database including a plurality of entries, each entry being defined by an entry class type and including a plurality of typed fields, the apparatus comprising:
-
a providing component configured to provide a template having a template class type, the template defining a set of attributes;
a determining component configured to determine whether the entry class type of one of the plurality of entries and the template class type match;
a comparing component configured to compare the attributes of the template with corresponding fields of the one entry to determine whether the template matches the one entry when the determining component determines that the entry class type of the one entry and the template class type match; and
an identifying component configured to identify that the one entry is a matching entry when it is determined that the template matches the one entry. - View Dependent Claims (6, 7)
a comparing component configured to compare only those entries of the same class type as, or a supertype of, the template.
-
-
7. The apparatus of claim 5, further including:
a modifying component configured to modify the database in response to the identification of the matching entry.
-
8. A method for type-safe attribute matching in a database including a plurality of entries, each entry being defined by an entry class type and including a plurality of typed fields, the method comprising:
-
providing a template having a template class type, the template defining a set of attributes;
determining whether the entry class type of one of the plurality of entries and the template class type match;
comparing the attributes of the template with corresponding fields of the one entry to determine whether the template matches the one entry when it is determined that the entry class type of the one entry and the template class type match; and
identifying that the one entry is a matching entry when it is determined that the template matches the one entry. - View Dependent Claims (9, 10, 11, 12, 13, 14)
comparing only those entries of the same class type as, or a supertype of, the template.
-
-
10. The method of claim 8, further including the step of:
modifying the database in response to the identification of the matching entry.
-
11. The method of claim 10, wherein the providing step includes the step of:
-
providing a second template of the same template class type as, or a supertype of, the first template, the second template defining a second set of attributes; and
wherein the method further includes the step of;
modifying the matching entry to reflect the attributes of the second template.
-
-
12. The method of claim 10, further including the step of:
deleting the matching entry.
-
13. The method of claim 8, wherein the template comprises a wildcard attribute that matches any value in the corresponding field of the entry, and wherein the comparing step further includes the step of comparing non-wildcard attributes of the template to corresponding fields of the one entry.
-
14. The method of claim 13, wherein the value of the wildcard attribute is a null value.
Specification