Class BaseFactory

    • Constructor Detail

      • BaseFactory

        public BaseFactory()
    • Method Detail

      • getPersistence

        public Persistence getPersistence​(ClassDescriptor clsDesc)
        Returns a persistence implementation for the specified object type (given its descriptor) on behalf of the specified cache engine. Return null if no persistence support is available for the specified object type.
        Specified by:
        getPersistence in interface PersistenceFactory
        Parameters:
        clsDesc - The class descriptor.
        Returns:
        A suitable persistence implementation or null.
      • getCallQuery

        public PersistenceQuery getCallQuery​(java.lang.String call,
                                             java.lang.Class<?>[] paramTypes,
                                             java.lang.Class<?> javaClass,
                                             java.lang.String[] fields,
                                             int[] sqlTypes)
        Needed to process OQL queries of "CALL" type (using stored procedure call). This feature is specific for JDO.
        Specified by:
        getCallQuery in interface PersistenceFactory
        Parameters:
        call - Stored procedure call (without "{call")
        paramTypes - The types of the query parameters
        javaClass - The Java class of the query results
        fields - The field names
        sqlTypes - The field SQL types
        Returns:
        null if this feature is not supported.
      • adjustSqlType

        public java.lang.Class<?> adjustSqlType​(java.lang.Class<?> sqlType)
        Some databases has some problems with some SQL types. Usually it is enough to merely replace one SQL type by another.
        Specified by:
        adjustSqlType in interface PersistenceFactory
        Parameters:
        sqlType - The correspondent Java class for the SQL type in mapping.xml
        Returns:
        The correspondent Java class for the SQL type that should be used instead.