Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.search
Class ViewSpecification

    java.lang.Object

      |

      +--oracle.ifs.search.ViewSpecification

All Implemented Interfaces:
  java.io.Serializable

public class ViewSpecification
extends java.lang.Object
implements java.io.Serializable

Use a `ViewSpecification` to create a SQL View. A SQL View is built from a SearchSpecification. Additional information that can be specifed is the viewName, the DirectoryObject that to be used for applying security, and the columns to be retrived.

See Also:
  Serialized Form

Constructor Summary
`ViewSpecification(java.lang.String viewName, SearchSpecification sp)` Constructs a ViewSpecification object.
`ViewSpecification(java.lang.String viewName, SearchSpecification sp, boolean repView)` Constructs a ViewSpecification object.

Method Summary
`void` | `addClass(LibrarySession sess, java.lang.String clsName, java.lang.String[] attrs)` Let's you add attributes into your view.
`void` | `addClass(LibrarySession sess, java.lang.String clsName, java.lang.String[] attrs, java.lang.String[] aliases)` Let's you add attributes into your view.
`AttributeValue[]` | `getBindValues()` Returns Bind Values that are used in this View Specification.
`SearchSpecification` | `getSearchSpecification()` Returns the SearchSpecification of this view.
`void` | `replaceView(boolean replace)` Makes this ViewSpec a Create or Replace View operation if replace is true.
`void` | `setBindValues(AttributeValue[] bindVals)` If the ViewSpecification uses a Late Boudn SearchSpecification, use this function to supply Bind Values.
`void` | `setSearchSpecification(SearchSpecification sp)` Replaces the SearchSpecification of the view.
`void` | `setViewName(java.lang.String viewName)` Sets the name of this view.

Constructor Detail

### ViewSpecification

    public ViewSpecification(java.lang.String viewName,
                             SearchSpecification sp)
                      throws IfsException

  Constructs a ViewSpecification object. All result Classes from the search specification appear in the view by default. If you need to customize the attributes that a view should have, use addClass() method.
  Parameters:
    `String` - Name of the View to be created.
    `SearchSpecification` - Use this SearchSpecification to create View.

### ViewSpecification

    public ViewSpecification(java.lang.String viewName,
                             SearchSpecification sp,
                             boolean repView)
                      throws IfsException

  Constructs a ViewSpecification object. All result Classes from the search specification appear in the view by default. If you need to customize the attributes that a view should have, use addClass() method. Last parameter specifies if the new View replaces an existing view or not.
  Parameters:
    `String` - Name of the View to be created.
    `SearchSpecification` - Use this SearchSpecification to create View.
    `bool` - If true, it is a Create Or Replace.

Method Detail

### addClass

    public void addClass(LibrarySession sess,
                         java.lang.String clsName,
                         java.lang.String[] attrs)
                  throws IfsException

  Let's you add attributes into your view. This is the way to provide the columns that appear in the view. If addClass() is not called, all attributes from ResultClasses of Search Specification will appear in the view. If addClass() method is used, then only those attributes which are specified using addClass() will be prseent in the view.

  Calls addClass(LibrarySession, String, String[], String[]).

  Parameters:
    `LibrarySession` - CurrentSession
    `String` - iFS Class Name
    `String[]` - List of attributes from the above class
  Throws:
    `IfsException` - If the operation fails.

### addClass

    public void addClass(LibrarySession sess,
                         java.lang.String clsName,
                         java.lang.String[] attrs,
                         java.lang.String[] aliases)
                  throws IfsException

  Let's you add attributes into your view. This is the way to provide the columns that appear in the view. If addClass() is not called, all attributes from ResultClasses of Search Specification will appear in the view. If addClass() method is used, then only those attributes which are specified using addClass() will be prseent in the view. This function also let's you customize the names of columns appearing in the view by providing Aliases.

  Parameters:
    `LibrarySession` - CurrentSession
    `String` - iFS Class Name
    `String[]` - List of attributes from the above class
    `String[]` - List of Aliase for Column names in the view.
  Throws:
    `IfsException` - If the operation fails.

### setSearchSpecification

    public void setSearchSpecification(SearchSpecification sp)
                                throws IfsException

  Replaces the SearchSpecification of the view.
  Parameters:
    `SearchSpecification` - New non null SearchSpecification.
  Throws:
    `IfsException` - If the operation fails.

### getSearchSpecification

    public SearchSpecification getSearchSpecification()

  Returns the SearchSpecification of this view.

### setViewName

    public void setViewName(java.lang.String viewName)
                     throws IfsException

  Sets the name of this view.
  Parameters:
    `String` - New Name of the View (cannot be null).

### replaceView

    public void replaceView(boolean replace)
                     throws IfsException

  Makes this ViewSpec a Create or Replace View operation if replace is true.
  Parameters:
    `boolean` - If true, operation is Create or Replace.
  Throws:
    `IfsException` - if the operation fails.

### setBindValues

    public void setBindValues(AttributeValue[] bindVals)
                       throws IfsException

  If the ViewSpecification uses a Late Boudn SearchSpecification, use this function to supply Bind Values.
  Parameters:
    `AttributeValue[]` - Array of Bind values.
  Throws:
    `IfsException` - if the operation fails.

### getBindValues

    public AttributeValue[] getBindValues()
                                   throws IfsException

  Returns Bind Values that are used in this View Specification.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD