Skip to main content

Position

The Position entity, mapped to the position table.

Tableposition
Tenant-scopedYes — extends TenantOwned
Columns4
Relationships1
Sourcebackend/src/main/java/com/motorph/payroll/model/Position.java

Columns​

FieldTypeColumnNullNotes
positionIdIntegerposition_id—primary key, generated
positionNameStringposition_name——
descriptionStringdescriptionYes—
isArchivedBooleanis_archived——

Plus tenant_id, inherited from TenantOwned. Hibernate stamps it on insert and adds where tenant_id = ? to every query, so it is never written or read by application code.

Relationships​

FieldKindTargetJoin columnRequired
department@ManyToOneDepartmentdepartment_idYes

Referenced by​

EntityFieldKind
Employeeposition@ManyToOne
JobOfferposition@ManyToOne
JobRequisitionposition@ManyToOne

Neighbourhood​

Repository​

PositionRepository​

Declared over Position with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/PositionRepository.java

MethodReturnsNotes
findAllByDepartment_DepartmentId(Integer departmentId)List<Position>derived
findAllBy()List<Position>derived
findWithDepartmentByPositionId(Integer positionId)Optional<Position>derived
existsByDepartment_DepartmentId(Integer departmentId)booleanderived
existsByPositionNameIgnoreCaseAndDepartment_DepartmentId(String positionName, Integer departmentId)booleanderived
existsByPositionNameIgnoreCaseAndDepartment_DepartmentIdAndPositionIdNot(String positionName, Integer departmentId, Integer positionId)booleanderived

Reached by​

These controllers hold — directly or through a service they depend on — a repository over Position.

ControllerBase pathEndpointsModule
DepartmentController/api/departments8HR
EmployeeController/api/employees9HR
JobOfferController/api/job-offers6Recruitment
JobRequisitionController/api/job-requisitions8Recruitment
PositionController/api/positions8HR
PublicSignupController/api/public/signup2Billing & Platform
TenantAdminController/api/admin/tenants7Billing & Platform

Generated page

This page is rebuilt from the source on every docs build by docs-site/scripts/gen-code-wiki.mjs. Editing it has no effect — change the code, or, if what you want to say is prose, write it in docs/.