Class NamedQueryFactoryBean

  • All Implemented Interfaces:
    org.springframework.beans.factory.FactoryBean<String>

    public class NamedQueryFactoryBean
    extends Object
    implements org.springframework.beans.factory.FactoryBean<String>
    ProductWriter allows to get named query from resource NamedQueries.xml. It is used for example in job to get sql for JdbcCursorItemReader.
    Since:
    3.0.0
    • Field Detail

      • entityManager

        private javax.persistence.EntityManager entityManager
      • queryName

        private String queryName
    • Constructor Detail

      • NamedQueryFactoryBean

        public NamedQueryFactoryBean()
    • Method Detail

      • getObject

        public String getObject()
                         throws Exception
        Specified by:
        getObject in interface org.springframework.beans.factory.FactoryBean<String>
        Throws:
        Exception
      • getObjectType

        public Class<?> getObjectType()
        Specified by:
        getObjectType in interface org.springframework.beans.factory.FactoryBean<String>
      • isSingleton

        public boolean isSingleton()
        Specified by:
        isSingleton in interface org.springframework.beans.factory.FactoryBean<String>
      • setEntityManager

        public void setEntityManager​(javax.persistence.EntityManager entityManager)
        Parameters:
        entityManager - the EntityManager to set.
      • setQueryName

        public void setQueryName​(String queryName)
        Parameters:
        queryName - the name of the query.