-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #474 from FraunhoferISST/feat/erp_adapter_trigger
Feat: Erpadapter Trigger Service
- Loading branch information
Showing
22 changed files
with
484 additions
and
73 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
83 changes: 83 additions & 0 deletions
83
.../org/eclipse/tractusx/puris/backend/erpadapter/domain/model/ErpAdapterTriggerDataset.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,83 @@ | ||
/* | ||
* Copyright (c) 2024 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. | ||
* (represented by Fraunhofer ISST) | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://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. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.eclipse.tractusx.puris.backend.erpadapter.domain.model; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.IdClass; | ||
import lombok.*; | ||
import org.eclipse.tractusx.puris.backend.common.edc.domain.model.AssetType; | ||
|
||
import java.io.Serializable; | ||
import java.util.Date; | ||
|
||
@Entity | ||
@IdClass(ErpAdapterTriggerDataset.Key.class) | ||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@EqualsAndHashCode | ||
public class ErpAdapterTriggerDataset { | ||
|
||
@Id | ||
private String partnerBpnl; | ||
|
||
@Id | ||
private String ownMaterialNumber; | ||
|
||
@Id | ||
private AssetType assetType; | ||
|
||
@Id | ||
private String directionCharacteristic; | ||
|
||
private long lastPartnerRequest; | ||
|
||
private long nextErpRequestScheduled; | ||
|
||
@Override | ||
public String toString() { | ||
return "ErpAdapterTriggerDataset{" + | ||
"partnerBpnl='" + partnerBpnl + '\'' + | ||
", ownMaterialNumber='" + ownMaterialNumber + '\'' + | ||
", assetType=" + assetType + | ||
", directionCharacteristic='" + directionCharacteristic + '\'' + | ||
", lastPartnerRequest=" + new Date(lastPartnerRequest) + | ||
", nextErpRequestScheduled=" + new Date(nextErpRequestScheduled) + | ||
'}'; | ||
} | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@EqualsAndHashCode | ||
@ToString | ||
public static class Key implements Serializable { | ||
private String partnerBpnl; | ||
private String ownMaterialNumber; | ||
private AssetType assetType; | ||
private String directionCharacteristic; | ||
|
||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...actusx/puris/backend/erpadapter/domain/repository/ErpAdapterTriggerDatasetRepository.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,30 @@ | ||
/* | ||
* Copyright (c) 2024 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. | ||
* (represented by Fraunhofer ISST) | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://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. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.eclipse.tractusx.puris.backend.erpadapter.domain.repository; | ||
|
||
import org.eclipse.tractusx.puris.backend.erpadapter.domain.model.ErpAdapterTriggerDataset; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface ErpAdapterTriggerDatasetRepository extends JpaRepository<ErpAdapterTriggerDataset, ErpAdapterTriggerDataset.Key> { | ||
} |
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
Oops, something went wrong.