WebObjects 5.4.2

com.webobjects.eoaccess
Class EOEntityIndex

java.lang.Object
  extended by com.webobjects.eoaccess.EOEntityIndex
All Implemented Interfaces:
EOPropertyListEncoding, EOSQLExpression.SQLValue

public class EOEntityIndex
extends Object
implements EOPropertyListEncoding, EOSQLExpression.SQLValue

EOEntityIndex represent an index on an entity.


Constructor Summary
EOEntityIndex()
           
EOEntityIndex(NSDictionary plist, EOEntity owner)
          Creates an EOEntityIndex object with the state specified in plist whose parent is owner.
 
Method Summary
 void addAttribute(EOAttribute attribute)
          Adds attribute to the receiver.
 NSArray attributes()
          Return the list of attribute used by this index
 void awakeWithPropertyList(NSDictionary dic)
          Finishes initializing the receiver from the property list dic, restoring references to other objects.
 com.webobjects.eoaccess.EOEntityIndex.Constraint constraint()
          Returns the index constraint.
 void encodeIntoPropertyList(NSMutableDictionary result)
          Encodes the receiver as a property list.
 EOEntity entity()
           
 boolean isEmpty()
          Checks if the receiver has any attribute defined.
 String name()
          Returns the internal name of the index.
 com.webobjects.eoaccess.EOEntityIndex.Order order()
          Returns the index order.
 void removeAttribute(EOAttribute attribute)
          Removes attribute from the receiver.
 void setAttributes(NSArray value)
          Sets the list of attributes used by this index
 void setConstraint(com.webobjects.eoaccess.EOEntityIndex.Constraint value)
          Set the value of the index constraint.
 void setConstraint(String value)
          Set the value of the index constraint.
 void setEntity(EOEntity value)
           
 void setName(String name)
          Sets the attribute's name to name, which can not be a name that is already in use by an attribute or relationship belonging to the same entity as the receiver.
 void setOrder(com.webobjects.eoaccess.EOEntityIndex.Order value)
          Set the value of the index order.
 void setOrder(String value)
          Set the value of the index order.
 void setType(com.webobjects.eoaccess.EOEntityIndex.Type value)
          Set the value of the index type.
 void setType(String value)
          Set the value of the index type.
 void setUserInfo(NSDictionary aDictionary)
          Sets the dictionary of auxiliary data, which the application can use for whatever it needs.
 String toString()
           
 com.webobjects.eoaccess.EOEntityIndex.Type type()
          Returns the index type.
 NSDictionary userInfo()
          Returns a dictionary of user data.
 String valueForSQLExpression(EOSQLExpression context)
          Returns a String to be used to represent the receiver in an SQL statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EOEntityIndex

public EOEntityIndex()

EOEntityIndex

public EOEntityIndex(NSDictionary plist,
                     EOEntity owner)
Creates an EOEntityIndex object with the state specified in plist whose parent is owner. The possible keys for plist are:

Parameters:
plist - A dictionary whose keys are attribute names and whose values are the attribute values for the new EOAttribute object.
owner - The parent object for the new EOAttribute.
Method Detail

awakeWithPropertyList

public void awakeWithPropertyList(NSDictionary dic)
Description copied from interface: EOPropertyListEncoding
Finishes initializing the receiver from the property list dic, restoring references to other objects. Consequently, it should not be invoked until all other objects from dic that the receiver might reference have been created. The receiver must have been created with a constructor of the form:

          public ClassName(NSDictionary propertyList, Object owner)
     

Specified by:
awakeWithPropertyList in interface EOPropertyListEncoding
Parameters:
dic - The property list representation of an object.

encodeIntoPropertyList

public void encodeIntoPropertyList(NSMutableDictionary result)
Description copied from interface: EOPropertyListEncoding
Encodes the receiver as a property list. Property lists are NSDictionary objects whose values are String, NSDictionary, NSArray, and NSData objects.

Specified by:
encodeIntoPropertyList in interface EOPropertyListEncoding
Parameters:
result - A dictionary into which to encode the receiver.

valueForSQLExpression

public String valueForSQLExpression(EOSQLExpression context)
Description copied from interface: EOSQLExpression.SQLValue
Returns a String to be used to represent the receiver in an SQL statement.

Specified by:
valueForSQLExpression in interface EOSQLExpression.SQLValue
Parameters:
context - an EOSQLExpression object used a context for the receiver
Returns:
a String to be used to represent the receiver in an SQL statement

name

public String name()
Returns the internal name of the index.

Returns:

setName

public void setName(String name)
Sets the attribute's name to name, which can not be a name that is already in use by an attribute or relationship belonging to the same entity as the receiver.

Parameters:
name - The name to set for the attribute.
See Also:
EOEntityIndex.name(), EOEntityIndex.entity()

attributes

public NSArray attributes()
Return the list of attribute used by this index

Returns:
list of attributes

setAttributes

public void setAttributes(NSArray value)
Sets the list of attributes used by this index

Parameters:
value -

addAttribute

public void addAttribute(EOAttribute attribute)
Adds attribute to the receiver.

Parameters:
attribute -

removeAttribute

public void removeAttribute(EOAttribute attribute)
Removes attribute from the receiver.

Parameters:
attribute -

isEmpty

public boolean isEmpty()
Checks if the receiver has any attribute defined.

Returns:

constraint

public com.webobjects.eoaccess.EOEntityIndex.Constraint constraint()
Returns the index constraint.

Returns:

setConstraint

public void setConstraint(com.webobjects.eoaccess.EOEntityIndex.Constraint value)
Set the value of the index constraint. Default is None.

Parameters:
value -

setConstraint

public void setConstraint(String value)
Set the value of the index constraint. Invalid value are ignored. Default is None.

Parameters:
value -

type

public com.webobjects.eoaccess.EOEntityIndex.Type type()
Returns the index type.

Returns:

setType

public void setType(com.webobjects.eoaccess.EOEntityIndex.Type value)
Set the value of the index type. Default is Clustered.

Parameters:
value -

setType

public void setType(String value)
Set the value of the index type. Invalid value are ignored. Default is Clustered.

Parameters:
value -

order

public com.webobjects.eoaccess.EOEntityIndex.Order order()
Returns the index order.

Returns:

setOrder

public void setOrder(com.webobjects.eoaccess.EOEntityIndex.Order value)
Set the value of the index order. Default is Ascending.

Parameters:
value -

setOrder

public void setOrder(String value)
Set the value of the index order. Invalid value are ignored. Default is Ascending.

Parameters:
value -

entity

public EOEntity entity()
Returns:
the entity

setEntity

public void setEntity(EOEntity value)
Parameters:
entity - the entity to set

userInfo

public NSDictionary userInfo()
Returns a dictionary of user data. An application can use this data for whatever it needs.

Returns:
an NSDictionary of user data

setUserInfo

public void setUserInfo(NSDictionary aDictionary)
Sets the dictionary of auxiliary data, which the application can use for whatever it needs. dictionary can only contain property list data types (that is, NSDictionary, String, NSArray, and NSData).

Parameters:
aDictionary - specifies dictionary of auxiliary data

toString

public String toString()
Overrides:
toString in class Object

Last updated June 2008

Copyright © 2000-2008 Apple Inc.