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"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
| <!-- Project description --> | |
| <modelVersion>4.0.0</modelVersion> | |
| <parent> | |
| <groupId>bart.prokop.name</groupId> | |
| <artifactId>parent-pom</artifactId> | |
| <version>1.0-SNAPSHOT</version> | |
| </parent> |
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 static void main(String... args) { | |
| Cluster cluster = HFactory | |
| .getOrCreateCluster("test-cluster", "localhost:9160"); | |
| ColumnFamilyDefinition cfDef = HFactory | |
| .createColumnFamilyDefinition("MyKeyspace", "ColumnFamilyName", ComparatorType.BYTESTYPE); | |
| KeyspaceDefinition newKeyspace = HFactory | |
| .createKeyspaceDefinition("MyKeyspace", ThriftKsDef.DEF_STRATEGY_CLASS, 1, | |
| Arrays.asList(cfDef)); | |
| cluster.addKeyspace(newKeyspace, true); | |
| } |
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 static void main(String... args) throws Exception { | |
| Cluster cluster = HFactory.getOrCreateCluster("test-cluster", "localhost:9160"); | |
| Keyspace keyspace = HFactory.createKeyspace("MyKeyspace", cluster); | |
| ColumnFamilyTemplate<String, String> template = | |
| new ThriftColumnFamilyTemplate<String, String>(keyspace, "ColumnFamilyName", | |
| StringSerializer.get(), StringSerializer.get()); | |
| ColumnFamilyUpdater<String, String> updater = template.createUpdater("ABCDEFGHIJKLMNOPQ"); | |
| updater.setString("firstName", "John"); |
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 static void main(String... args) throws Exception { | |
| Cluster cluster = HFactory.getOrCreateCluster("test-cluster", "localhost:9160"); | |
| Keyspace keyspace = HFactory.createKeyspace("MyKeyspace", cluster); | |
| RangeSlicesQuery<String, String, String> q = HFactory | |
| .createRangeSlicesQuery(keyspace, StringSerializer.get(), | |
| StringSerializer.get(), StringSerializer.get()); | |
| q.setColumnFamily("ColumnFamilyName"); | |
| q.setRange(null, null, false, 2); |
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
| package com.appspot.natanedwin.app; | |
| import com.google.appengine.api.datastore.Email; | |
| import com.vaadin.data.util.converter.Converter; | |
| import com.vaadin.data.util.converter.DefaultConverterFactory; | |
| import java.util.Locale; | |
| /** | |
| * @author Bartłomiej Prokop | |
| */ |
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
| class MyVaadinButton extends Button { | |
| @Autowired | |
| private SpringOnClickHandler handler; | |
| } |
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"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
| <!-- Project description --> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>name.prokop.bart</groupId> | |
| <artifactId>bart-gae-poc</artifactId> | |
| <version>1</version> | |
| <packaging>war</packaging> |
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"?> | |
| <appengine-web-app xmlns="http://appengine.google.com/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://appengine.google.com/ns/1.0 http://googleappengine.googlecode.com/svn/branches/1.2.1/java/docs/appengine-web.xsd"> | |
| <application>bart-gae-poc</application> | |
| <version>1</version> | |
| <threadsafe>true</threadsafe> | |
| </appengine-web-app> |
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"?> | |
| <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> | |
| <display-name>Natan i Edwin</display-name> | |
| <listener> | |
| <listener-class>com.appspot.bartgaepoc.WarmupListener</listener-class> | |
| </listener> | |
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
| package com.appspot.bartgaepoc; | |
| import javax.servlet.ServletContextEvent; | |
| import javax.servlet.ServletContextListener; | |
| import org.springframework.context.annotation.AnnotationConfigApplicationContext; | |
| public class WarmupListener implements ServletContextListener { | |
| private static AnnotationConfigApplicationContext annotationConfigApplicationContext; |
OlderNewer