protected void ensureSerializerInitialized() { if (serializerName != null && serializer == null) { serializer = getSerializers().getSerializerByName(serializerName); if (serializer == null) { serializer = getFallbackSerializer(serializerName); } if (serializer == null) { throw LOG.serializerNotDefinedException(this); } } }
protected void ensureSerializerInitialized() { if (serializerName != null && serializer == null) { serializer = getSerializers().getSerializerByName(serializerName); if (serializer == null) { serializer = getFallbackSerializer(serializerName); } if (serializer == null) { throw LOG.serializerNotDefinedException(this); } } }
public VariableSerializers join(VariableSerializers other) { DefaultVariableSerializers copy = new DefaultVariableSerializers(); // "other" serializers override existing ones if their names match for (TypedValueSerializer<?> thisSerializer : serializerList) { TypedValueSerializer<?> serializer = other.getSerializerByName(thisSerializer.getName()); if (serializer == null) { serializer = thisSerializer; } copy.addSerializer(serializer); } // add all "other" serializers that did not exist before to the end of the list for (TypedValueSerializer<?> otherSerializer : other.getSerializers()) { if (!copy.serializerMap.containsKey(otherSerializer.getName())) { copy.addSerializer(otherSerializer); } } return copy; }
public VariableSerializers join(VariableSerializers other) { DefaultVariableSerializers copy = new DefaultVariableSerializers(); // "other" serializers override existing ones if their names match for (TypedValueSerializer<?> thisSerializer : serializerList) { TypedValueSerializer<?> serializer = other.getSerializerByName(thisSerializer.getName()); if (serializer == null) { serializer = thisSerializer; } copy.addSerializer(serializer); } // add all "other" serializers that did not exist before to the end of the list for (TypedValueSerializer<?> otherSerializer : other.getSerializers()) { if (!copy.serializerMap.containsKey(otherSerializer.getName())) { copy.addSerializer(otherSerializer); } } return copy; }
protected void initJpa() { if (jpaPersistenceUnitName != null) { jpaEntityManagerFactory = JpaHelper.createEntityManagerFactory(jpaPersistenceUnitName); } if (jpaEntityManagerFactory != null) { sessionFactories.put(EntityManagerSession.class, new EntityManagerSessionFactory(jpaEntityManagerFactory, jpaHandleTransaction, jpaCloseEntityManager)); JPAVariableSerializer jpaType = (JPAVariableSerializer) variableSerializers.getSerializerByName(JPAVariableSerializer.NAME); // Add JPA-type if (jpaType == null) { // We try adding the variable right after byte serializer, if available int serializableIndex = variableSerializers.getSerializerIndexByName(ValueType.BYTES.getName()); if (serializableIndex > -1) { variableSerializers.addSerializer(new JPAVariableSerializer(), serializableIndex); } else { variableSerializers.addSerializer(new JPAVariableSerializer()); } } } }
protected void initJpa() { if (jpaPersistenceUnitName != null) { jpaEntityManagerFactory = JpaHelper.createEntityManagerFactory(jpaPersistenceUnitName); } if (jpaEntityManagerFactory != null) { sessionFactories.put(EntityManagerSession.class, new EntityManagerSessionFactory(jpaEntityManagerFactory, jpaHandleTransaction, jpaCloseEntityManager)); JPAVariableSerializer jpaType = (JPAVariableSerializer) variableSerializers.getSerializerByName(JPAVariableSerializer.NAME); // Add JPA-type if (jpaType == null) { // We try adding the variable right after byte serializer, if available int serializableIndex = variableSerializers.getSerializerIndexByName(ValueType.BYTES.getName()); if (serializableIndex > -1) { variableSerializers.addSerializer(new JPAVariableSerializer(), serializableIndex); } else { variableSerializers.addSerializer(new JPAVariableSerializer()); } } } }
protected void ensureSerializerInitialized() { if (serializerName != null && serializer == null) { serializer = getSerializers().getSerializerByName(serializerName); if (serializer == null) { serializer = getFallbackSerializer(serializerName); } if (serializer == null) { throw LOG.serializerNotDefinedException(this); } } }
public VariableSerializers join(VariableSerializers other) { DefaultVariableSerializers copy = new DefaultVariableSerializers(); // "other" serializers override existing ones if their names match for (TypedValueSerializer<?> thisSerializer : serializerList) { TypedValueSerializer<?> serializer = other.getSerializerByName(thisSerializer.getName()); if (serializer == null) { serializer = thisSerializer; } copy.addSerializer(serializer); } // add all "other" serializers that did not exist before to the end of the list for (TypedValueSerializer<?> otherSerializer : other.getSerializers()) { if (!copy.serializerMap.containsKey(otherSerializer.getName())) { copy.addSerializer(otherSerializer); } } return copy; }
protected void initJpa() { if (jpaPersistenceUnitName != null) { jpaEntityManagerFactory = JpaHelper.createEntityManagerFactory(jpaPersistenceUnitName); } if (jpaEntityManagerFactory != null) { sessionFactories.put(EntityManagerSession.class, new EntityManagerSessionFactory(jpaEntityManagerFactory, jpaHandleTransaction, jpaCloseEntityManager)); JPAVariableSerializer jpaType = (JPAVariableSerializer) variableSerializers.getSerializerByName(JPAVariableSerializer.NAME); // Add JPA-type if (jpaType == null) { // We try adding the variable right after byte serializer, if available int serializableIndex = variableSerializers.getSerializerIndexByName(ValueType.BYTES.getName()); if (serializableIndex > -1) { variableSerializers.addSerializer(new JPAVariableSerializer(), serializableIndex); } else { variableSerializers.addSerializer(new JPAVariableSerializer()); } } } }