| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.j_spaces.core.client.RegExQuery<T>
@Deprecated public class RegExQuery<T>
The RegExQuery class is used to query the space using the Java Regular Expression syntax. For more information about Java regular expression syntax - see:
| Constructor Summary | |
|---|---|
RegExQuery()
Deprecated. Empty constructor.  | 
|
RegExQuery(Entry entry,
           String[] attributeName,
           String[] regExpression)
Deprecated. Constructor to initialize Regular Expression Query with Entry, from which class name is extracted.  | 
|
RegExQuery(String className,
           String[] attributeName,
           String[] regExpression)
Deprecated. Constructor to initialize Regular Expression Query with Entry class name.  | 
|
RegExQuery(T object,
           String[] attributeName,
           String[] regExpression)
Deprecated. Constructor to initialize Regular Expression Query with Entry, from which class name is extracted.  | 
|
| Method Summary | |
|---|---|
 ExternalEntry | 
getExternalEntry()
Deprecated. Returns a reference to the ExternalEntry set for this query.  | 
 T | 
getObject()
Deprecated. Extract the POJO for the current query.  | 
 void | 
setClassName(String className)
Deprecated. Sets the template class name of an entry to be queried.  | 
 void | 
setQuery(String wherePart)
Deprecated. Sets the Query WHERE statement (without the WHERE keyword).  | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public RegExQuery(String className,
                  String[] attributeName,
                  String[] regExpression)
className - - The class name to be queriedattributeName - - The field name array attribute to be queried.regExpression - - The regular expression. Every item in the array should match the
 
 RegExQuery regExQuery = new RegExQuery(MyEntry.class.getName(), new String[]{"m_string"}, new String[]{"a*b"});
 Entry result[] = space.readMultiple(regExQuery, null, Integer.MAX_VALUE);
 ...
 
 
 String querystr = "a?b";
 System.out.println("Register Notification for RegExQuery:" + querystr);
 RegExQuery m_Template = new RegExQuery(new MyEntry(), new String[]{"m_string"}, new String[]{querystr});
 NotifyDelegator delegator = new NotifyDelegator(space, m_Template, null, this, Lease.FOREVER, null, false, NotifyModifiers.NOTIFY_ALL);
 System.out.println("Notification registered. Registration id: "
         + delegator.getEventRegistration().getID()
         + " ; Sequence number: "
         + delegator.getEventRegistration().getSequenceNumber());
 
public RegExQuery(Entry entry,
                  String[] attributeName,
                  String[] regExpression)
entry - - Entry or an instance of ExternalEntry to be queried by its class name.attributeName - - the field name array attribute to be queried.regExpression - - the regular expression to be matched with every item in the attributeName array
 
 RegExQuery regExQuery = new RegExQuery(MyEntry, new String[]{"m_string"}, new String[]{"a*b"});
 Entry result = space.take(regExQuery, null, JavaSpace.NO_WAIT);
 if (result==null)
     System.out.println("No match found for query: "+regExQuery);
 else
     System.out.println("Found entry: " +result);
 
public RegExQuery(T object,
                  String[] attributeName,
                  String[] regExpression)
object - - POJO or an instance of ExternalEntry to be queried by its class name.attributeName - - the field name array attribute to be queried.regExpression - - the regular expression to be matched with every item in the attributeName array
 
 RegExQuery regExQuery = new RegExQuery(MyEntry, new String[]{"m_string"}, new String[]{"a*b"});
 Entry result = space.take(regExQuery, null, JavaSpace.NO_WAIT);
 if (result==null)
     System.out.println("No match found for query: "+regExQuery);
 else
     System.out.println("Found entry: " +result);
 public RegExQuery()
| Method Detail | 
|---|
public ExternalEntry getExternalEntry()
public void setClassName(String className)
setClassName in interface Query<T>className - The Entry class name to be set.public void setQuery(String wherePart)
setQuery in interface Query<T>wherePart - WHERE statementpublic T getObject()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||