Jeevan Patil jeevan-patil

View HashMapAdd
1 2 3 4 5 6 7 8 9 10
public class HashMap<K,V>
extends AbstractMap<K,V>
implements Map<K,V>, Cloneable, Serializable
{
 
public V put(K key, V value) {
if(key is already present in map) {
return oldValue;
}
View HashSet
1 2 3 4 5 6 7 8 9 10
public class HashSet<E>
extends AbstractSet<E>
implements Set<E>, Cloneable, java.io.Serializable
{
private transient HashMap<E,Object> map;
 
// Dummy value to associate with an Object in the backing Map
private static final Object PRESENT = new Object();
View SetImpl
1 2 3 4 5 6 7 8 9 10
package org.java.collections;
 
import java.util.HashSet;
import java.util.Set;
 
/**
*
* @author jeevan
* @date 15-Feb-2014
* @purpose Demonstrate how to add elements to Set.
View cache-headers.jsp
1 2 3
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
View app-context.xml
1 2 3 4 5 6 7 8 9 10
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
View CustomerDaoImpl.java
1 2 3 4 5 6 7 8 9 10
package com.transbank.online.dao.impl;
 
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
 
import com.transbank.online.bean.Customer;
import com.transbank.online.dao.iface.CustomerDao;
View CustomerServiceImpl.java
1 2 3 4 5 6 7 8 9 10
package com.transbank.online.service.impl;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
 
import com.transbank.online.bean.Customer;
import com.transbank.online.dao.iface.CustomerDao;
import com.transbank.online.service.iface.CustomerService;
View CustomerController.java
1 2 3 4 5 6 7 8 9 10
package com.transbank.online.controller.customer;
 
import java.util.List;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
View servlet-context.xml
1 2 3 4 5 6 7 8 9 10
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
 
<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
Something went wrong with that request. Please try again.