Class StoredFunctionCall

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Call

    public class StoredFunctionCall
    extends StoredProcedureCall
    Purpose: Used to define a platform independent function call. Note that not all platforms support stored functions. This supports output parameters. Functions can also be called through custom SQL.
    See Also:
    Serialized Form
    • Constructor Detail

      • StoredFunctionCall

        public StoredFunctionCall()
      • StoredFunctionCall

        public StoredFunctionCall​(int sqlType,
                                  java.lang.String sqlTypeName,
                                  java.lang.Class javaType)
      • StoredFunctionCall

        public StoredFunctionCall​(int sqlType,
                                  java.lang.String sqlTypeName,
                                  java.lang.Class javaType,
                                  org.eclipse.persistence.internal.helper.DatabaseField nestedType)
      • StoredFunctionCall

        public StoredFunctionCall​(int sqlType,
                                  java.lang.String sqlTypeName,
                                  java.lang.String javaTypeClassName)
      • StoredFunctionCall

        public StoredFunctionCall​(int sqlType,
                                  java.lang.String sqlTypeName,
                                  java.lang.String javaTypeClassName,
                                  org.eclipse.persistence.internal.helper.DatabaseField nestedType)
    • Method Detail

      • getCallHeader

        public java.lang.String getCallHeader​(org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)
        INTERNAL: Return call header for the call string.
        Overrides:
        getCallHeader in class StoredProcedureCall
      • isStoredFunctionCall

        public boolean isStoredFunctionCall()
        INTERNAL:
        Overrides:
        isStoredFunctionCall in class org.eclipse.persistence.internal.databaseaccess.DatasourceCall
      • prepareInternal

        public void prepareInternal​(org.eclipse.persistence.internal.sessions.AbstractSession session)
        INTERNAL:
        Overrides:
        prepareInternal in class StoredProcedureCall
      • setResult

        public void setResult​(java.lang.String name)
        PUBLIC: Define the field name to be substitute for the function return.
      • setResult

        public void setResult​(java.lang.String name,
                              java.lang.Class type)
        PUBLIC: Define the field name to be substitute for the function return. The type is the type of Java class desired back from the function, this is dependent on the type returned from the function.
      • setResult

        public void setResult​(java.lang.String name,
                              int type,
                              java.lang.String typeName)
        PUBLIC: Define the field name to be substitute for the function return. The type is the type of Java class desired back from the function, this is dependent on the type returned from the function.
      • setResult

        public void setResult​(int type,
                              java.lang.String typeName,
                              java.lang.Class javaType)
        PUBLIC: Define the ObjectRelationalDatabaseField to be substituted for the function return. The type is the JDBC type code, this is dependent on the type required by the procedure. The typeName is the JDBC type name, this may be required for ARRAY or STRUCT types. The javaType is the mapped Class that has an ObjectRelationalDataTypeDescriptor for the ARRAY or STRUCT type typeName
      • setResult

        public void setResult​(int type,
                              java.lang.String typeName,
                              java.lang.Class javaType,
                              org.eclipse.persistence.internal.helper.DatabaseField nestedType)
        PUBLIC: Define the ObjectRelationalDatabaseField to be substituted for the function return. This will typically be called for ARRAY types. The type is the JDBC type code, this is dependent on the type required by the procedure. The typeName is the JDBC type name, this may be required for ARRAY types. The javaType is the mapped Class that has an ObjectRelationalDataTypeDescriptor for the ARRAY type typeName The nestedType is a database field representing the type the ARRAY holds onto.
      • setResult

        public void setResult​(java.lang.String name,
                              int type)
        PUBLIC: Define the field name to be substitute for the function return. The type is the type of Java class desired back from the function, this is dependent on the type returned from the function.
      • setResultCursor

        public void setResultCursor()
        PUBLIC: Define to return cursor as result.