CustomLinksService

@Service
open class CustomLinksService : LinksBaseService<T>

The CustomLinksService class is useful to manage all the CustomRefyLink database operations

Author

N7ghtm4r3 - Tecknobit

See also

Constructors

Link copied to clipboard
@Autowired
constructor(customLinksRepository: CustomLinksRepository)
Constructor used to init the service

Properties

Link copied to clipboard
customLinksRepository instance for the custom links repository
Link copied to clipboard
protected open var entityManager: EntityManager

Functions

Link copied to clipboard
private open fun attachMap(linkId: String, table: String, map: Map<String, Any>, columns: Array<String>)
Method to attach a map value to the link
Link copied to clipboard
protected open fun batchDelete(table: String, values: Collection<out Any>, columns: Array<@NotNull String>)
Link copied to clipboard
protected open fun <V> batchInsert(command: EquinoxItemsHelper.InsertCommand, table: String, batchQuery: EquinoxItemsHelper.BatchQuery<V>)
Link copied to clipboard
open fun createCustomLink(userId: String, linkId: String, title: String, description: String, hasUniqueAccess: Boolean, expiredTime: ExpiredTime, fields: Map<String, Any>, resources: Map<String, Any>)
Method to execute the query to save a link
Link copied to clipboard
open fun deleteLink(linkId: String)
Method to delete a link
Link copied to clipboard
open fun editCustomLink(userId: String, linkId: String, title: String, description: String, hasUniqueAccess: Boolean, expiredTime: ExpiredTime, fields: Map<String, Any>, resources: Map<String, Any>)
Method to execute the query to save a link
Link copied to clipboard
private open fun editMap(linkId: String, table: String, currentMap: Map<String, out Any>, map: Map<String, Any>, columns: Array<String>)
Method to edit a map attached to the link
Link copied to clipboard
open fun findById(linkId: String): CustomRefyLink
Method to find a custom link by its identifier
Link copied to clipboard
open fun getItemIfAllowed(userId: String, linkId: String): CustomRefyLink
Method used to get an item if the user is authorized
Link copied to clipboard
open fun getUserCustomLinks(userId: String, page: Int, pageSize: Int, keywords: Set<String>): PaginatedResponse<CustomRefyLink>
Method to get all the user's custom links
Link copied to clipboard
protected open fun <V> syncBatch(model: EquinoxItemsHelper.SyncBatchModel, table: String, batchQuery: EquinoxItemsHelper.BatchQuery<V>)