This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| InputStream is = loadReportTemplate(); | |
| HashMap datasets = new HashMap(); | |
| datasets.put("APP_CONTEXT_KEY_MOCKCOMPANYDATASET", companyRepository.findAll().iterate()); | |
| // start enginee | |
| EngineConfig config = new EngineConfig(); | |
| config.setEngineHome(System.getProperty("java.io.tmpdir")); | |
| Platform.startup(config); | |
| IReportEngineFactory factory = (IReportEngineFactory) Platform | |
| .createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <beans xmlns="http://www.springframework.org/schema/beans" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xmlns:jms="http://www.springframework.org/schema/jms" | |
| xmlns:amq="http://activemq.apache.org/schema/core" | |
| xsi:schemaLocation=" | |
| http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | |
| http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd | |
| http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <beans xmlns="http://www.springframework.org/schema/beans" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xmlns:amq="http://activemq.apache.org/schema/core" | |
| xsi:schemaLocation=" | |
| http://www.springframework.org/schema/beans | |
| http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | |
| http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> | |
| <!-- Hibernate section --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.hibernate.Session; | |
| import org.hibernate.SessionFactory; | |
| import org.hibernate.search.backend.impl.jms.AbstractJMSHibernateSearchController; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.stereotype.Service; | |
| import javax.jms.MessageListener; | |
| @Service | |
| public class RemoteHibernateSearchController extends AbstractJMSHibernateSearchController implements MessageListener { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.hibernate.search.backend.impl.jms.JmsBackendQueueProcessor; | |
| import javax.jms.JMSException; | |
| import javax.jms.Queue; | |
| import javax.jms.QueueConnection; | |
| import javax.jms.QueueConnectionFactory; | |
| import java.util.Properties; | |
| /** | |
| * A bridge between {@link JmsBackendQueueProcessor} and spring-managed AMQ beans. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.springframework.beans.BeansException; | |
| import org.springframework.context.ApplicationContext; | |
| import org.springframework.context.ApplicationContextAware; | |
| public class ApplicationContextProvider implements ApplicationContextAware { | |
| protected static ApplicationContext applicationContext; | |
| @Override | |
| public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var currentEqualsLevel = 0; | |
| var maxEqualsLevel = 10; | |
| function equals(o1, o2) { | |
| if (currentEqualsLevel>=maxEqualsLevel) | |
| return true; // we consider objects equal to this level | |
| if (o1 === o2) return true; | |
| if (o1 === null || o2 === null) return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <body ui-view="main"> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public enum PostgresDateTrunc { | |
| second, | |
| minute, | |
| hour, | |
| day, | |
| week, | |
| month, | |
| quarter, | |
| year; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.hibernate.Criteria; | |
| import org.hibernate.criterion.Order; | |
| import org.hibernate.criterion.ProjectionList; | |
| import org.hibernate.criterion.Projections; | |
| import org.hibernate.type.StandardBasicTypes; | |
| import org.hibernate.type.Type; | |
| import java.util.List; | |
| public class GenericRepository { |