Step 00 : Download the migration script
svn-migration-scripts.jar
Here : https://bitbucket.org/atlassian/svn-migration-scripts/downloads
package com.jelies.spring3tomcat7.config.quartz; | |
import org.quartz.spi.TriggerFiredBundle; | |
import org.springframework.beans.factory.config.AutowireCapableBeanFactory; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.ApplicationContextAware; | |
import org.springframework.scheduling.quartz.SpringBeanJobFactory; | |
/** | |
* This JobFactory autowires automatically the created quartz bean with spring @Autowired dependencies. |
====================================== | |
Usage: | |
Fetcher<Source, MyEntity> f = new Fetcher<Source, MyEntity>(source) { | |
@Override | |
public List<MyEntity> fetch(Pageable pageRequest) | |
{ | |
return source.findAll(pageRequest); | |
} | |
}; |
// String utils | |
// | |
// resources: | |
// -- mout, https://github.com/mout/mout/tree/master/src/string | |
/** | |
* "Safer" String.toLowerCase() | |
*/ | |
function lowerCase(str) { | |
return str.toLowerCase(); |
package com.willvuong.foodie.controller; | |
import com.willvuong.foodie.dao.PlaceRepository; | |
import com.willvuong.foodie.domain.Place; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.data.repository.CrudRepository; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
DELIMITER $$ | |
DROP PROCEDURE IF EXISTS add_email_address_column_to_customers_table $$ | |
-- Create the stored procedure to perform the migration | |
CREATE PROCEDURE add_email_address_column_to_customers_table() | |
BEGIN | |
-- Add the email_address column to the customers table, if it doesn't already exist |
package com.jelies.hibernate.validation; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.TreeMap; | |
import org.apache.log4j.Logger; | |
import org.hibernate.HibernateException; |
Step 00 : Download the migration script
svn-migration-scripts.jar
Here : https://bitbucket.org/atlassian/svn-migration-scripts/downloads
import java.io.FileDescriptor; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
public class HelloWorld{ | |
private static HelloWorld instance; | |
public static void main(String[] args){ | |
instantiateHelloWorldMainClassAndRun(); |
public interface LabeledEnum { | |
String getLabel(); | |
} |
/** | |
* @description A simple check to ensure a number is not zero. Sets the "zero" validation accordingly. | |
* @usage <input ng-model="myModel" not-zero> | |
*/ | |
angular.module("app").directive("notZero", function() { | |
var linkFunc = function(scope, element, attrs, ngModel) { | |
var zeroValidator = function(value) { | |
var num = parseFloat(value); |