7/30/2016 0 Comments Framework bloatGlad that I found this - still relevant. Majority of enterprise application performance issues can be solved if data access code is in its native language with out convoluted framework bloat the authoritarian "I want all cool framework names on my CV" architect throws at the project.
https://vimeo.com/28885655
0 Comments
Copied the answer by Chris CA from Apple Support Communities thread.
To easily move some of your library...
Now you can delete the TV shows from /Music/iTunes/iTunes media/TV Shows/. All metadata will be retained. After you are finished, go to iTunes prefs Advanced and reset the iTunes media folder location to the location you noted in step 2. The artwork or poster frame or default image (whatever you call it) of an iTunes video (especially if its made and published from iMovie) can be changed by the following steps
1. Double click and play the video in new window 2. Pause/Stop and drag the time scale to the frame you want to set as poster frame 3. Right click on the video and select "Set Poster Frame" 7/22/2013 1 Comment SQL RANK() function Example SELECT p.version, p.launch_date
RANK() OVER (PARTITION BY p.version ORDER BY p.launch_date DESC) "Rank" FROM product p WHERE p.id = '1234' 7/22/2013 0 Comments SQL: Select the minimum and maximum values of a column grouped by another column for a given where clause.select p.version, min (p.launch_date) as first, max(v.launch_date) as last
from product p where p.id = '1234' group by p.version, p.id order by p.version The above query selects the first and last launch dates for every version (major version number assumed) of a given product with id 1234 7/12/2013 1 Comment How to stop JiBX from marshalling empty nodes for null fields on structure mappingUse a test-method on the structure to return false if the field value is null.
Note: This can be applied only when the usage attribute is set to optional (ie. usage="optional") E.g. <structure name="CreditCard" field="creditCard" usage="optional" test-method="hasValidCredtiCard"> <value name="CardNumber" field="number" usage="optional"/> <value name="ValidThru" get-method="getValidThru" set-method="setValidThru" usage="optional"/> <value name="NameOnCard" field="name" usage="optional"/> .... </structure> Data Source definition
<bean id="oracleDataSource" > <property name="jndiName" value="jdbc/oracleDSName"/> </bean> <bean id="mySqlDataSource" > <property name="jndiName" value="jdbc/mySqlDSName"/> </bean> Session Factory Configuration <bean id="oracleSessionFactory" > <property name="dataSource" ref="oracleDataSource" /> <property name="packagesToScan"> <list> <value>com.feature.entities.db</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop> <prop key="hibernate.show_sql">false</prop> </props> </property> </bean> <bean id="mySQLSessionFactory" > <property name="dataSource" ref="mySqlDataSource" /> <property name="annotatedClasses"> <list> <value>com.feature.entities.db.ClassA</value> <value>com.feature.entities.db.ClassB</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="hibernate.show_sql">false</prop> </props> </property> </bean> Configure the DAOs. <bean id="oracleBaseDAO" > <property name="sessionFactory" ref="oracleSessionFactory"/> </bean> <bean id="mySqlBaseDAO" > <property name="sessionFactory" ref="mySQLSessionFactory"/> </bean> Step 1: declarations in applicationContext.xml
<?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:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> <!-- SessionFactory is assumed to be defined --> <bean id="documentsDAO" class="com.feature.dao.DocumentsDAOImpl" lazy-init="true"> <property name="sessionFactory" ref="sessionFactory"/> </bean> <bean id="documentsService" class="com.feature.service.DocumentsServiceImpl" lazy-init="true"> <property name="dao" ref="documentsDAO"/> </bean> <bean id="txManager" class="org.springframework.transaction.jta.JtaTransactionManager" /> <aop:config> <aop:pointcut id="documentsServiceMethods" expression="execution(* com.feature.service.DocumentsService.*(..))" /> <aop:advisor advice-ref="txAdvice" pointcut-ref="documentsServiceMethods"/> </aop:config> <tx:advice id="txAdvice" transaction-manager="txManager"> <tx:attributes> <tx:method name="*" propagation="REQUIRED"/> </tx:attributes> </tx:advice> </beans> Step 2: Annotate the Class package com.feature.service import org.springframework.transaction.annotation.Transactional; import com.feature.dao.DocumentsDAO; import com.feature.entity.Document; import com.feature.entity.Category ; public class DocumentsServiceImpl implements DocumentsService { @Transactional private List<Document> getDocuments(Category category){ DocumentsDAO dao = getDocumentsDAO(); return dao.getDocuments(category); } } NOTE: The @Transactional annotation can be applied to methods in any class - not necessarily a DAO |