Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hibernate.test.dynamicentity.interceptor
Class InterceptorDynamicEntityTest  view InterceptorDynamicEntityTest download InterceptorDynamicEntityTest.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.hibernate.test.TestCase
              extended byorg.hibernate.test.dynamicentity.interceptor.InterceptorDynamicEntityTest
All Implemented Interfaces:
junit.framework.Test

public class InterceptorDynamicEntityTest
extends org.hibernate.test.TestCase

Demonstrates custom interpretation of entity-name through an Interceptor.

Here, we are generating dynamic proxies on the fly to represent our entities. Because of this, Hibernate would not be able to determine the appropriate entity mapping to use given one of these proxies (they are named like $Proxy1, or such). Thus, we plug a custom Interceptor into the session to perform this entity-name interpretation.


Field Summary
 
Fields inherited from class org.hibernate.test.TestCase
SKIP_LOG
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
InterceptorDynamicEntityTest(java.lang.String x)
           
 
Method Summary
protected  java.lang.String[] getMappings()
           
static junit.framework.TestSuite suite()
           
 void testIt()
           
 
Methods inherited from class org.hibernate.test.TestCase
afterSessionFactoryBuilt, appliesTo, assertClassAssignability, assertElementTypeAssignability, configure, dialectIsCaseSensitive, dialectSupportsEmptyInList, dropAfterFailure, fullTestName, getBaseForMappings, getCacheConcurrencyStrategy, getCfg, getDialect, getExtraProperties, getSessions, openSession, openSession, overrideCacheStrategy, readCommittedIsolationMaintained, recreateSchema, reportSkip, reportSkip, runTest, setCfg, setUp, sfi
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InterceptorDynamicEntityTest

public InterceptorDynamicEntityTest(java.lang.String x)
Method Detail

getMappings

protected java.lang.String[] getMappings()

suite

public static junit.framework.TestSuite suite()

testIt

public void testIt()