Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preliminary implementation of CaseType object.
- Loading branch information
Showing
20 changed files
with
629 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
507 changes: 507 additions & 0 deletions
507
infra/schema/src/main/resources/xml/ns/public/common/common-case-management-3.xsd
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1662,4 +1662,8 @@ | |
</automaticallyApproved> | ||
</service> | ||
|
||
<case version="1"> | ||
<name>case1</name> | ||
</case> | ||
|
||
</objects> |
89 changes: 89 additions & 0 deletions
89
repo/repo-sql-impl/src/main/java/com/evolveum/midpoint/repo/sql/data/common/RCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/* | ||
* Copyright (c) 2010-2017 Evolveum | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.evolveum.midpoint.repo.sql.data.common; | ||
|
||
import com.evolveum.midpoint.prism.PrismContext; | ||
import com.evolveum.midpoint.repo.sql.data.RepositoryContext; | ||
import com.evolveum.midpoint.repo.sql.data.common.embedded.RPolyString; | ||
import com.evolveum.midpoint.repo.sql.util.DtoTranslationException; | ||
import com.evolveum.midpoint.repo.sql.util.IdGeneratorResult; | ||
import com.evolveum.midpoint.repo.sql.util.MidPointJoinedPersister; | ||
import com.evolveum.midpoint.repo.sql.util.RUtil; | ||
import com.evolveum.midpoint.schema.GetOperationOptions; | ||
import com.evolveum.midpoint.schema.SelectorOptions; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.CaseType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.FormType; | ||
import org.hibernate.annotations.ForeignKey; | ||
import org.hibernate.annotations.Persister; | ||
|
||
import javax.persistence.Embedded; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Table; | ||
import javax.persistence.UniqueConstraint; | ||
import java.util.Collection; | ||
import java.util.Objects; | ||
|
||
/** | ||
* TODO fill-in relevant data | ||
* | ||
* @author mederly | ||
*/ | ||
@Entity | ||
@ForeignKey(name = "fk_case") | ||
@Table(uniqueConstraints = @UniqueConstraint(name = "uc_case_name", columnNames = {"name_norm"})) | ||
@Persister(impl = MidPointJoinedPersister.class) | ||
public class RCase extends RObject<CaseType> { | ||
|
||
private RPolyString name; | ||
|
||
@Embedded | ||
public RPolyString getName() { | ||
return name; | ||
} | ||
|
||
public void setName(RPolyString name) { | ||
this.name = name; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) | ||
return true; | ||
if (!(o instanceof RCase)) | ||
return false; | ||
if (!super.equals(o)) | ||
return false; | ||
RCase rForm = (RCase) o; | ||
return Objects.equals(name, rForm.name); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(super.hashCode(), name); | ||
} | ||
|
||
public static void copyFromJAXB(CaseType jaxb, RCase repo, RepositoryContext repositoryContext, | ||
IdGeneratorResult generatorResult) throws DtoTranslationException { | ||
RObject.copyFromJAXB(jaxb, repo, repositoryContext, generatorResult); | ||
} | ||
|
||
@Override | ||
public CaseType toJAXB(PrismContext prismContext, Collection<SelectorOptions<GetOperationOptions>> options) | ||
throws DtoTranslationException { | ||
throw new UnsupportedOperationException("Shouldn't be needed anymore."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters