-
Notifications
You must be signed in to change notification settings - Fork 7
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 #63 from disk91/roaming_feature
Roaming feature
- Loading branch information
Showing
176 changed files
with
71,635 additions
and
636 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
108 changes: 108 additions & 0 deletions
108
src/main/java/eu/heliumiot/console/jpa/db/DeviceProfile.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,108 @@ | ||
/* | ||
* Copyright (c) - Paul Pinault (aka disk91) - 2020. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software | ||
* and associated documentation files (the "Software"), to deal in the Software without restriction, | ||
* including without limitation the rights to use, copy, modify, merge, publish, distribute, | ||
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all copies or | ||
* substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS | ||
* OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR | ||
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
package eu.heliumiot.console.jpa.db; | ||
|
||
import fr.ingeniousthings.tools.HexaConverters; | ||
import org.hibernate.annotations.GenericGenerator; | ||
import org.hibernate.annotations.Immutable; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Id; | ||
import javax.persistence.Table; | ||
import java.sql.Timestamp; | ||
import java.util.UUID; | ||
|
||
@Entity | ||
@Immutable | ||
@Table(name = "device_profile") | ||
public class DeviceProfile { | ||
|
||
@Id | ||
@GenericGenerator(name = "UUIDGenerator", strategy = "uuid2") | ||
@Column(name = "id", updatable = false, nullable = false) | ||
private UUID id; | ||
|
||
@GenericGenerator(name = "UUIDGenerator", strategy = "uuid2") | ||
@Column(name = "tenant_id", updatable = false, nullable = false) | ||
private UUID tenantId; | ||
|
||
@Column(name = "created_at") | ||
private Timestamp createdAt; | ||
@Column(name = "updated_at") | ||
private Timestamp updatedAt; | ||
|
||
@Column(name = "region") | ||
private String region; | ||
@Column(name = "name") | ||
private String name; | ||
|
||
|
||
// --- | ||
|
||
|
||
public UUID getId() { | ||
return id; | ||
} | ||
|
||
public void setId(UUID id) { | ||
this.id = id; | ||
} | ||
|
||
public UUID getTenantId() { | ||
return tenantId; | ||
} | ||
|
||
public void setTenantId(UUID tenantId) { | ||
this.tenantId = tenantId; | ||
} | ||
|
||
public Timestamp getCreatedAt() { | ||
return createdAt; | ||
} | ||
|
||
public void setCreatedAt(Timestamp createdAt) { | ||
this.createdAt = createdAt; | ||
} | ||
|
||
public Timestamp getUpdatedAt() { | ||
return updatedAt; | ||
} | ||
|
||
public void setUpdatedAt(Timestamp updatedAt) { | ||
this.updatedAt = updatedAt; | ||
} | ||
|
||
public String getRegion() { | ||
return region; | ||
} | ||
|
||
public void setRegion(String region) { | ||
this.region = region; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
src/main/java/eu/heliumiot/console/jpa/repository/DeviceProfileRepository.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,41 @@ | ||
/* | ||
* Copyright (c) - Paul Pinault (aka disk91) - 2020. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software | ||
* and associated documentation files (the "Software"), to deal in the Software without restriction, | ||
* including without limitation the rights to use, copy, modify, merge, publish, distribute, | ||
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all copies or | ||
* substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS | ||
* OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR | ||
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
package eu.heliumiot.console.jpa.repository; | ||
|
||
import eu.heliumiot.console.jpa.db.DeviceProfile; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.domain.Slice; | ||
import org.springframework.data.repository.CrudRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import java.sql.Timestamp; | ||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
@Repository | ||
public interface DeviceProfileRepository extends CrudRepository<DeviceProfile, UUID> { | ||
|
||
public DeviceProfile findOneDeviceProfileById(UUID id); | ||
|
||
public List<DeviceProfile> findDeviceProfileByTenantId( | ||
UUID tenantId | ||
); | ||
|
||
} |
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
Oops, something went wrong.