LocationInfo.java
/*
* Copyright 2026 Global Crop Diversity Trust
* Licensed under the Apache License, Version 2.0
* See LICENSE file in project root folder or http://www.apache.org/licenses/LICENSE-2.0
*/
package org.gringlobal.api.model;
import org.gringlobal.custom.validation.javax.CodeValueField;
import org.gringlobal.model.community.CommunityCodeValues;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
public class LocationInfo {
/** Location ID. */
private Long id;
/** Site: Reference to the site this location belongs to. */
private SiteInfo site;
/** Location name: Full name of this location including all parent location names, separated by >. */
private String locationName;
/** Location number: The location number within {@link parentLocation}. */
private String locationNumber;
/** Location Number Part 1: First part of the location number. */
private String locationNumberPart1;
/** Location Number Part 2: Second part of the location number. */
private Long locationNumberPart2;
/** Location Number Part 3: Third part of the location number. */
private String locationNumberPart3;
/** Location Type: Type of location. Uses LOCATION_TYPE vocabulary. */
@CodeValueField(CommunityCodeValues.LOCATION_TYPE)
private String locationTypeCode;
/** Geography: Reference to the geographic information for this location. */
private GeographyInfo geography;
/** Barcode: Barcode used to identify this location. */
private String barcode;
/** Capacity: Total available capacity of this location. No decimals; whole numbers only. */
private int capacity;
/** Capacity Unit: Unit of measure for the location capacity. Uses UNIT_OF_CAPACITY vocabulary. */
@CodeValueField(CommunityCodeValues.UNIT_OF_CAPACITY)
private String capacityUnitCode;
/** Enabled: Flag indicating whether this location is enabled. */
private boolean isEnabled;
public LocationInfo(Long id) {
this.id = id;
}
}