/** * Old way to get a GenericDelegator. * <p> * Normally you would use {@link com.atlassian.jira.ofbiz.OfBizDelegator} instead. * Get OfBizDelegator injected or use {@link com.atlassian.jira.component.ComponentAccessor#getOfBizDelegator()}. * <p> * If you really want the raw Entity Engine "delegator", get the instance of DelegatorInterface from Pico. * You can call <tt>ComponentAccessor#getComponent(DelegatorInterface.class)</tt> if you need static access. * * @return GenericDelegator * * @deprecated Use {@link com.atlassian.jira.ofbiz.OfBizDelegator} or get {@link org.ofbiz.core.entity.DelegatorInterface} from Pico instead. Since v5.0. */ public static GenericDelegator getGenericDelegator() { if (genericDelegator == null) { genericDelegator = GenericDelegator.getGenericDelegator("default"); } return genericDelegator; } }
/** Get the GenericDelegator instance that created this value object and that is repsonsible for it. *@return GenericDelegator object */ public GenericDelegator getDelegator() { if (internalDelegator == null) { if (delegatorName != null) internalDelegator = GenericDelegator.getGenericDelegator(delegatorName); if (internalDelegator == null) { throw new IllegalStateException("[GenericEntity.getDelegator] could not find delegator with name " + delegatorName); } } return internalDelegator; }
/** Get the GenericDelegator instance that created this value object and that is repsonsible for it. *@return GenericDelegator object */ public GenericDelegator getDelegator() { if (internalDelegator == null) { if (delegatorName != null) internalDelegator = GenericDelegator.getGenericDelegator(delegatorName); if (internalDelegator == null) { throw new IllegalStateException("[GenericEntity.getDelegator] could not find delegator with name " + delegatorName); } } return internalDelegator; }
/** * Get the GenericDelegator instance that created this value object and that is responsible for it. * * @return GenericDelegator object */ public GenericDelegator getDelegator() { if (internalDelegator == null) { if (delegatorName != null) internalDelegator = GenericDelegator.getGenericDelegator(delegatorName); if (internalDelegator == null) { throw new IllegalStateException("[GenericEntity.getDelegator] could not find delegator with name " + delegatorName); } } return internalDelegator; }
/** * @param backupProject contains the issue id's that we are interested in partitioning. * @param projectImportTemporaryFiles the interface to the temporary import files. * @param modelEntities a List of {@link org.ofbiz.core.entity.model.ModelEntity}'s that the partitioner should be * interested in. * @param delegatorInterface required for persistence */ public IssueRelatedEntitiesPartitionHandler(final BackupProject backupProject, final ProjectImportTemporaryFiles projectImportTemporaryFiles, final List<ModelEntity> modelEntities, final DelegatorInterface delegatorInterface) { this.backupProject = backupProject; this.projectImportTemporaryFiles = projectImportTemporaryFiles; this.delegator = GenericDelegator.getGenericDelegator(delegatorInterface.getDelegatorName()); modelEntityMap = new HashMap<String, ModelEntity>(); changeGroupIds = new HashSet<Long>(); commentIds = new HashSet<Long>(); for (final ModelEntity modelEntity : modelEntities) { final String entityName = modelEntity.getEntityName(); modelEntityMap.put(entityName, modelEntity); } }
/** * @param backupProject contains the issue id's that we are interested in partitioning. * @param projectImportTemporaryFiles the interface to the temporary import files. * @param modelEntities a List of {@link org.ofbiz.core.entity.model.ModelEntity}'s that the partitioner should be * interested in. * @param delegatorInterface required for persistence */ public GenericEntitiesPartitionHandler(final BackupProject backupProject, final ProjectImportTemporaryFiles projectImportTemporaryFiles, final List<ModelEntity> modelEntities, final DelegatorInterface delegatorInterface) { this.backupProject = backupProject; this.projectImportTemporaryFiles = projectImportTemporaryFiles; this.delegator = GenericDelegator.getGenericDelegator(delegatorInterface.getDelegatorName()); modelEntityMap = new HashMap<String, ModelEntity>(); for (final ModelEntity modelEntity : modelEntities) { final String entityName = modelEntity.getEntityName(); modelEntityMap.put(entityName, modelEntity); } }
/** * @param backupProject contains the issue id's that we are interested in partitioning. * @param projectImportTemporaryFiles the temp files provider * @param modelEntity is the ModelEntity for the "Issue" entity * @param delegatorInterface required for persistence */ public IssuePartitionHandler(final BackupProject backupProject, final ProjectImportTemporaryFiles projectImportTemporaryFiles, final ModelEntity modelEntity, final DelegatorInterface delegatorInterface) { assertModelEntityForName(modelEntity, IssueParser.ISSUE_ENTITY_NAME); this.projectImportTemporaryFiles = projectImportTemporaryFiles; this.delegator = GenericDelegator.getGenericDelegator(delegatorInterface.getDelegatorName()); this.backupProject = backupProject; this.modelEntity = modelEntity; }