public Object acceptCollection(Collection c) { return c.getElement().accept( this ); }
public Object acceptCollection(Collection c) { return c.getElement().accept( this ); }
private String getJavaTypeName(Value value, boolean preferRawTypeNames) { return (String) value.accept( new JavaTypeFromValueVisitor() ); }
private String getJavaTypeName(Value value, boolean preferRawTypeNames) { return (String) value.accept( new JavaTypeFromValueVisitor() ); }
public String getHibernateTypeName(Property p) { return (String) p.getValue().accept(new EntityNameFromValueVisitor()); }
public String getHibernateTypeName(Property p) { return (String) p.getValue().accept(new EntityNameFromValueVisitor()); }
public String getSafeHibernateTypeName(Property p) { return (String) p.getValue().accept(new EntityNameFromValueVisitor(false)); }
public String getSafeHibernateTypeName(Property p) { return (String) p.getValue().accept(new EntityNameFromValueVisitor(false)); }
public String getTag(Property property) { PersistentClass persistentClass = property.getPersistentClass(); if(persistentClass!=null) { if(persistentClass.getVersion()==property) { String typeName = ((SimpleValue)property.getValue()).getTypeName(); if("timestamp".equals(typeName) || "dbtimestamp".equals(typeName)) { return "timestamp"; } else { return "version"; } } } String toolTag = (String) property.getValue().accept(HBMTagForValueVisitor.INSTANCE); if ("component".equals(toolTag) && "embedded".equals(property.getPropertyAccessorName())){ toolTag = "properties"; } return toolTag; }
public String getTag(Property property) { PersistentClass persistentClass = property.getPersistentClass(); if(persistentClass!=null) { if(persistentClass.getVersion()==property) { String typeName = ((SimpleValue)property.getValue()).getTypeName(); if("timestamp".equals(typeName) || "dbtimestamp".equals(typeName)) { return "timestamp"; } else { return "version"; } } } String toolTag = (String) property.getValue().accept(HBMTagForValueVisitor.INSTANCE); if ("component".equals(toolTag) && "embedded".equals(property.getPropertyAccessorName())){ toolTag = "properties"; } return toolTag; }
Assert.assertEquals(role.getTable().getSchema(), "OTHERSCHEMA"); Assert.assertNotNull(property); property.getValue().accept(new DefaultValueVisitor(true) { public Object accept(Set o) { Assert.assertEquals(o.getCollectionTable().getSchema(), "THIRDSCHEMA"); Assert.assertEquals(role.getTable().getSchema(), "OTHERSCHEMA"); Assert.assertNotNull(property); property.getValue().accept(new DefaultValueVisitor(true) { public Object accept(Set o) { Assert.assertEquals(o.getCollectionTable().getSchema(), null);
@Override protected void visitProperty(PersistentClass clazz, Property property, IssueCollector collector) { Value value = property.getValue(); if(value instanceof Collection) { Collection col = (Collection) value; if(col.getCacheConcurrencyStrategy()!=null) { // caching is enabled if (!col.getElement().isSimpleValue()) { String entityName = (String) col.getElement().accept( new EntityNameFromValueVisitor() ); if(entityName!=null) { PersistentClass classMapping = getMetadata().getEntityBinding(entityName); if(classMapping.getCacheConcurrencyStrategy()==null) { collector.reportIssue( new Issue("CACHE_COLLECTION_NONCACHABLE_TARGET", Issue.HIGH_PRIORITY, "Entity '" + classMapping.getEntityName() +"' is referenced from the cache-enabled collection '" + col.getRole() + "' without the entity being cachable")); } } } } } } }
@Override protected void visitProperty(PersistentClass clazz, Property property, IssueCollector collector) { Value value = property.getValue(); if(value instanceof Collection) { Collection col = (Collection) value; if(col.getCacheConcurrencyStrategy()!=null) { // caching is enabled if (!col.getElement().isSimpleValue()) { String entityName = (String) col.getElement().accept( new EntityNameFromValueVisitor() ); if(entityName!=null) { PersistentClass classMapping = getMetadata().getEntityBinding(entityName); if(classMapping.getCacheConcurrencyStrategy()==null) { collector.reportIssue( new Issue("CACHE_COLLECTION_NONCACHABLE_TARGET", Issue.HIGH_PRIORITY, "Entity '" + classMapping.getEntityName() +"' is referenced from the cache-enabled collection '" + col.getRole() + "' without the entity being cachable")); } } } } } } }