Skip to content

Instantly share code, notes, and snippets.

@eleumik
eleumik / JsonReaderImpl.java
Created March 26, 2017 23:14
Johnzon org.apache.johnzon.core.JsonReaderImpl
@Override
public JsonObject readObject() {
final JsonStructure read = read();
if (false == read instanceof JsonObject) throw new JsonParsingException("Not a JSON Object", parser.getLocation());
return (JsonObject)read;
}
@eleumik
eleumik / HibernateQueryCompatibilityImpl52.java
Created March 25, 2017 05:15
HibernateQueryCompatibilityImpl52
import org.hibernate.Query;
import org.hibernate.SQLQuery;
import org.hibernate.Session;
import HibernateQueryCompatibility;
public class HibernateQueryCompatibilityImpl52 extends HibernateQueryCompatibility
{
// Warning: There is the same implementation in HibernateQueryCompatibilityImpl
// and HibernateQueryCompatibilityImpl52 because the 5.1-->5.2 upgrade is source
import org.hibernate.Query;
import org.hibernate.SQLQuery;
import org.hibernate.Session;
import HibernateQueryCompatibility;
/**
* A class used to obtain an {@link org.hibernate.Query}
* or a {@link org.hibernate.SQLQuery} from any version
* of Hibernate.
@eleumik
eleumik / HibernateQueryCompatibility.j
Created March 25, 2017 05:06
HibernateQueryCompatibility
import org.hibernate.Query;
import org.hibernate.SQLQuery;
import org.hibernate.Session;
/**
* Abstracts the operations on queries
* for compatibility reasons.
* @author michele vivoda
*
*/